Re: QuickForm basics

From: Date: Wed, 01 Oct 2003 15:59:45 +0000
Subject: Re: QuickForm basics
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8194@lists.php.net to get a copy of this message
<keith@setuplinux.com> wrote : > Ahhh ok. > > So from what everybody is telling me I can create the form and submit it > with no error checking, or I get error checking and can't submit the > data anywhere unless I do a > > if ($form->validate()) { > header('Location: client.php?var1=$var1&foo=$bar'); > } > > and resend all the variables I want to go to the next form. I > understand that the forms needs to submit to itself in order to provide > the error checking (smart idea btw) but I would think that you should > just be able to declare in the HTML_QuickForm or the submit button or > somewhere to do the header() redirect thing with all the form variables > if it's vaildated. That would seem to save alot of coding. I am glad you came to that conclusion by yourself ;) You can process the form values right after your $form->validate() and just before your header('Location'). But if you really need to pass them from form 1 to form 2, use HTML_QuickForm_Controller because as you said, "that would save a lot of coding" and is also a much safer way to handle your situation. Bertrand Mansion Mamasam

« previous php.pear.general (#8194) next »