Re: quickform auto form population
| From: | Bertrand Mansion | Date: | Thu, 07 Aug 2003 15:32:55 +0000 |
| Subject: | Re: quickform auto form population | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7085@lists.php.net to get a copy of this message | ||
<mikeatwork@ukonline.co.uk> wrote :
> 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?
Did you try setConstants(array('func' =>
'Front::application->checkCodeKeyValid')); ?
Bertrand Mansion
Mamasam