Re: [Quickform] isSubmitted() returns TRUE when it should not
| From: | Justin Patrin | Date: | Thu, 27 Oct 2005 03:35:47 +0000 |
| Subject: | Re: [Quickform] isSubmitted() returns TRUE when it should not | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21662@lists.php.net to get a copy of this message | ||
On 10/26/05, Damien Cros <damienc@cc.in2p3.fr> wrote:
> Hi!
>
> I'm working on a "quickform form" that is shown after another form
> has been submitted: you submit the first form and then it builds the
> html_quickform.
>
> At the end of the building part of the html_quickform, there's a
> if($form->validate)
>
> If you look at the quickform::validate method in quickform.php,
> there's a isSubmitted() method that should not return TRUE when the
> form is built for the first time.
>
> I think it returns TRUE because the first form was submitted before.
>
> How can I fix that?
>
If you're talking about 2 different forms (i.e. show form 1, form 1
submitted, show form 2) then you need to use the trackSubmit value in
the HTML_QuickForm constructor.
--
Justin Patrin