Re: QuickForm problem
| From: | Bertrand Mansion | Date: | Fri, 02 Jan 2004 12:58:42 +0000 |
| Subject: | Re: QuickForm problem | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9909@lists.php.net to get a copy of this message | ||
<cesare@ngi.it> wrote :
> Alle 11:55, venerdì 2 gennaio 2004, Cesare D'Amico ha scritto:
>> $form->addElement('hidden', 'zione', 'Modifica');
>> dump_var($form->getElement('zione'));
>
> I solved with:
>
> $azione =& $form->addElement('hidden', 'azione',
> 'Modifica');
> $azione->setValue('Modifica');
>
> but I'm still wondering why 'zione' works and 'azione' doesn't...
> I'm using method setDefaults(), but I don't think that it's related,
> since the other fields work.
Why don't you use setDefaults() to set your hidden field value too.
Or even better, setConstants() as these values are probably not modifiable
(unless you use them in a javascript).
I think there must be a problem somewhere else in your script where you set
the hidden field value to an empty value. But I can only guess...
Bertrand Mansion
Mamasam