Re: QuickForm basics

From: Date: Wed, 01 Oct 2003 15:38:12 +0000
Subject: Re: QuickForm basics
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8189@lists.php.net to get a copy of this message
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. Keith Keith Alexey Borzov wrote:
Hi! Keith Pettit wrote:
HTML_QuickForm_Controller looks promising, but what I'm doing is pretty simple. I just want to know how to submit the form. This is probally a more simple question than people are used to. I'm using the examples included with quickforms, which of couse only submit to themselves. Below is the code I'm using. WHere do I put in this code where to submit the form too when it validated? The page I want to submit to is "client.php" and I've tried putting that in various places without getting it to work right.
You set the form's action in the constructor: http://pear.php.net/manual/en/package.html.html-quickform.html-quickform.html-quickform.php But the QuickForm-based forms usually submit to the same page for a reason: you'll have to create the same form in client.php to be able to validate() it.


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