Re: QuickForm basics
| From: | Bertrand Mansion | Date: | Wed, 01 Oct 2003 10:32:45 +0000 |
| Subject: | Re: QuickForm basics | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-8171@lists.php.net to get a copy of this message | ||
<keith@setuplinux.com> wrote :
> Hi all,
>
> I'm using quickforms wich is pretty slick I must say but I had a couple
> newbie questions with it.
>
> Basically I have my initall quickform page, and I want to submit to a
> second quickform page. Here is the questions I have
>
> 1) how can I have the form do is checks then submit to the next page
> after error checking? Right now I can only seem to get it to do one or
> the other.
>
> new HTML_QuickForm('frmTest','get');
> $buttons[] = &HTML_QuickForm::createElement('submit', 'client.php',
> 'Submit');
>
> Above is what i"m using now from one of the examples included with
> QuickForms. I want the form to submit to client.php after it checks the
> "addRule" stuff.
>
> 2) When I do get the form to submit to the next quickform page, I need
> to do a db query based on the results from the first page and populate
> the form with the db values. But I get a results type section, I don't
> get forms that are editable. Not sure what I need to do to make sure
> this page is always editable.
You can give the HTML_QuickForm_Controller a try.
You can also try to add a hidden field in your form and check if its value
is set just before calling $form->validate() (in the same conditional if).
Bertrand Mansion
Mamasam