Re: Nested forms and validate each form
| From: | Mark Wiesemann | Date: | Mon, 13 Feb 2006 08:59:38 +0000 |
| Subject: | Re: Nested forms and validate each form | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22946@lists.php.net to get a copy of this message | ||
Mark Steudel wrote:
> Since I wanted the first form to think it was validated I didn't' change
> that one. [...]
You should consider putting your two forms into single scripts. After
the first one is validated, store the needed values from the form in a
session and then redirect to second script. Verify the setting of the
session values in the second script -- if the values are not given, the
first form wasn't submitted => redirect to the first one; if they are
given, show the (second) form.
For more complex tasks you could also have a look at
HTML_QuickForm_Controller, a very nice package for splitting forms into
pages. But you will need some time to fully understand the concept
behind it (at least that was the case for me and the FAQ warns about
that, too).
HTH,
Mark