Re: 2 QuickForms on same page
| From: | Bertrand Mansion | Date: | Tue, 08 Apr 2003 16:12:59 +0000 |
| Subject: | Re: 2 QuickForms on same page | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-4711@lists.php.net to get a copy of this message | ||
<ckline@rightcode.net> wrote :
> Hi all,
>
> I have a page that has two forms on it. The forms just submit back to
> the same page and I am handling the form data in an if() when
> form->validate()
>
> My problem is that the forms have required fields and when i submit one
> of the forms the other one gets mad about its required fields not being
> full. This even happens when I get rid of one of the QuickForms and
> just make it a 'normal' html form - when I submit that one the other
> form tries to validate.
>
> Is this the way things are and I need to find another solution to this
> problem, or is there some way of catching this?
Make a test to see which form was submitted (with a hidden or a submit value
for example) and only call validate if the right form is submitted.
Bertrand Mansion
Mamasam