Re: Template_flexy + QuickForm problem: hidden form fieldgets overwritten with bad value
| From: | Bertrand Mansion | Date: | Sun, 03 Aug 2003 22:17:37 +0000 |
| Subject: | Re: Template_flexy + QuickForm problem: hidden form fieldgets overwritten with bad value | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-6981@lists.php.net to get a copy of this message | ||
<crain@fuse.net> wrote :
> Bertrand,
>
> Thanks very much for the tip. If nothing else works, I'll do something
> like that, probably just change the variable name. I was just hoping
> that I could more directly address the problem, rather than code around
> it. If that's not possible, though, it's not the end of the world.
>
> Could someone point me to the method or methods responsible for
> rewriting current request variables into form field default values? Even
> if I can't change the behavior, I'd like to know what is actually going
> on, as I expect to use QuickForm much more in the near future. I
> couldn't find anything in the documentation or in my first skim over the
> QF code.
This is handled by events in element.php onQuickFormEvent() method, when the
updateValue event is passed. Some elements have special behaviors, for
example checkboxes or radios, and override onQuickFormEvent().
Basically, first we check for constants, then default values, then submitted
values. If the element finds a submitted value, then it uses it. As your
form uses GET method and the field has the same name, then it uses this
value.
Bertrand Mansion
Mamasam