Re: Multipage Forms using QuickForms

From: Date: Mon, 28 Jul 2003 17:35:44 +0000
Subject: Re: Multipage Forms using QuickForms
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6869@lists.php.net to get a copy of this message
Hello, On 07/28/2003 10:48 AM, Barry Steele wrote:
I have a single database transaction that requires the input of many (I mean lots) of individual data elements. It is required that these are spread across two pages, with the majority of the second page potentially frozen, depending on vlaues entered on the firat page. Both pages have a significant number of required fields so I have built a range of rules, etc. I am currently trying to get this to work by using two Smarty based templates that display the relevant data for each page. Using this method I can get the data entry flowing nicely but I find now that on hitting submit on the second page, the fields that had been submitted on from the first page are cleared (I have tried to freeze them, even persistently freeze them) but because they get cleared I get a validation error on the required fields and get taken right back to the start of the data entry process. Is there an easy way of doing multipage forms in Quickform? The main reason for wanting to do it this way is to ensure that the database entry can be done in a single transaction. And the application requires two pages.
This is not really based in QuickForms but you may want to try this class that provides multi-page forms letting you compose the pages body with Smarty. This was not trivial but the result is powerful. It can work in sequential mode (Wizard like with Next, Back Finish, Cancel buttons) or random access mode (tabbed pages with edit, view and cancel buttons). http://www.phpclasses.org/multipageforms It does not use sessions or cookies to carry values between the pages, just simple hidden fields. I developed this precisely with the same intention of yours, concentrate database changes in a single point of execution as it is not possible nor convinient to spread a database transaction among multiple page acceses. -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/

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