Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  How to have hidden variables used in Add record?

phpMyEdit General     How to have hidden variables used in Add record?
Odoslať novú tému   Odpovedať na tému    
 
Objectivist     Založený: 14.05.2004   Príspevky: 3  
Príspevok Zaslal: 2004-05-14 21:08
Návrat hore  Odpovedať s citátom     

I need to be able to set the value of a column (or generally, columns) that are totally hidden from the user but which will be inserted into the database table on an Add operation. For example, for a integer column 'role', I have:

$opts['fdd']['role'] = array(
'name' => 'Role',
'select' => 'T',
'maxlen' => 11,
'default' => '2',
'required' => true,
'sort' => true
);
$opts['fdd']['role']['options']='H';
$opts['fdd']['role']['values']=array('2');

in order to set the value of 'role' to 2 but not show it to the user. However, on an Add operation, the inserted value of 'role' in the new record is the default value of 0, leading me to think that it isn't being specified at all in the actual database INSERT.

I love this system but this issue has stopped me from doing what I need to do. Anybody with a solution, please help.

Phil

 
Objectivist     Založený: 14.05.2004   Príspevky: 3  
Príspevok Zaslal: 2004-05-14 21:53
Návrat hore  Odpovedať s citátom     

Thanks very much. I think that should be made more explicit in the documentation. It would be more logical to have any columns specified in the $opts array included in the Add operation, in my view. It is arguably a bug that it doesn't. I think it would be more logical and object oriented to have the hidden default values automatically included in the form. Why else are they being specified in the $opts array at all? Otherwise what's the purpose of even being able to specify that a value is hidden from input?

Phil

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov