Re: Using HTML_Quickform with passed parameters
| From: | Bertrand Mansion | Date: | Wed, 30 Jul 2003 16:59:55 +0000 |
| Subject: | Re: Using HTML_Quickform with passed parameters | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-6919@lists.php.net to get a copy of this message | ||
<keith@midnighthax.com> wrote :
> I'm trying to use HTML_Quickform, and the code is something like:
>
> ===================================
> require_once ("HTML/QuickForm.php");
> $form = new HTML_QuickForm('frmTest', 'get');
> $form->addElement...
>
> if ($form->validate()) {
Here you can use: if (isset($_GET['whatever']) && $form->validate())
> $form->freeze();
> $form->process('xxxxxx', false);
> }
> ===================================
>
> Problem I had was that the form kept being validated on first
> run-through of the above code. I eventually found the reason is because
> the URL used to run that code has two parameters passed to it, and the
> validate method thinks this means the form has been submitted.
>
> Is there any easy way around this?