Re: [QUICKFORM] Question about QuickForm
| From: | Alexey Borzov | Date: | Tue, 26 Aug 2003 07:39:45 +0000 |
| Subject: | Re: [QUICKFORM] Question about QuickForm | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7414@lists.php.net to get a copy of this message | ||
Hi!
Stanislav Okhvat wrote:
I did a quick test of QuickForm (QuickForm_example.php in docs/ dir) and have a question. If I pass a single variable to the page, say 'yes=1', which is not part of the form, why is the form redisplayed automatically with red messages indicating required fields, etc? I am wondering how to go about coding simple add/modify forms where the mode (i.e. add/modify) and record ids will be passed into the page via the GET method.You can create POST method forms, the problem with QuickForm_example.php is that it is GET method.
In OOHForms, we had to manually validate the form on the basis of the existence of certain hidden variables (which indicated that the form was actually posted), but in this example, the error messages are displayed regardless of whether the validate method is called or not.The same approach may be used for QuickForm. There is NO automagic validation, you have to call validate() method manually.