Re: QF controller Previous page causing validation execution
| From: | Bertrand Mansion | Date: | Mon, 22 Sep 2003 12:21:21 +0000 |
| Subject: | Re: QF controller Previous page causing validation execution | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7957@lists.php.net to get a copy of this message | ||
<borz_off@cs.msu.su> wrote :
> Hi!
>
> Mike Carter wrote:
>> Is it possible to disable validation checking when a user clicks the
>> "previous" button. I'd only like to execute validation on the press of
>> the 'next'. This would allow people who selected something wrong on the
>> previous page to go back and amend.
>>
>> This is especially important with dynamic forms whos elements are based
>> on selection on previous page of form.
>>
>> Hope there is a way to do this?
>
> Well, JS validation in QuickForm is bound to form's onSubmit handler.
> You probably need to do something in "previous" button's onClick handler
> to prevent validation from running.
> BTW, please post the solution you find here, I think many people may be
> interested in it.
With the new Controller class and modal/non-modal validation, that's
probably something we will have to deal with.
At the moment, I am not sure whether onclick="this.form.submit()" will call
the onSubmit event handler of the form. Maybe you can give it a try.
Bertrand Mansion
Mamasam