quickform auto form population
| From: | Mike Carter | Date: | Thu, 07 Aug 2003 15:25:57 +0000 |
| Subject: | quickform auto form population | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7084@lists.php.net to get a copy of this message | ||
I thought i was going bonkers this afternoon with something which seems to be a
feature of Quickform!
I have a number of pages containing Quickforms which represent a linked process.
each form has a hidden variable called "func" with an associated value.
when a quickform is submitted its action points straight to the next form. this
bypasses any server-side validation by quickform.
on the next page i then define a quickform which also has a hidden variable
called "func" but a different value is associated with this one.
i've spent about 3 hours debugging everything trying to work out why my 2nd page
seems to have a hidden "func" with the value of the first page still!?
turns out i think its the feature of quickform to auto populate a form field if
it finds the value somehow.
how can i override this quickform feature? I'm defining my hidden variables using:
$form->addElement('hidden', 'func',
'Front::application->checkCodeKeyValid');
which i thought would be enough to force a value to them, ignoring any
assistance by quickform to auto-populate fields.
how do i stop, or get around this problem?
regards,
mike carter
--
http://www.buddasworld.co.uk
----------------------------------------------
This mail sent through http://www.ukonline.net