Re: HTML_QuickForm - setValue() not working?
| From: | Alexey Borzov | Date: | Thu, 21 Oct 2004 12:07:25 +0000 |
| Subject: | Re: HTML_QuickForm - setValue() not working? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15013@lists.php.net to get a copy of this message | ||
Hi,
Ian P. Christian wrote:
I have a form that's changing a hidden element with javascript before submitting, and I'm trying to reset this element before redisplaying the form. Unfortunatly doing a setValue() on this element doesn't appear to work, and I just can't figure out why this might be.
$action =& $this->createElement('hidden', 'action');
$this->addElement($action);
Instead of that code use:
$action =& $this->addElement('hidden', 'action');
See also: http://pear.php.net/bugs/bug.php?id=80