Re: Quickform_Controller & Smarty

From: Date: Thu, 17 Mar 2005 02:43:25 +0000
Subject: Re: Quickform_Controller & Smarty
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18095@lists.php.net to get a copy of this message
James Carr wrote: >Hi, > >I currently have a multi-page form written with quickform and smarty. >It works well, but now a dillemma is faced. The client has requested >that at the end of the multi-page form, if I could display all the >forms on one page with the cells readonly, and a button on each one >letting them go back and fill the information in, then taking them >back to the current page. > >Any good examples or ideas on how to accomplish this? I still do not >now how to select a specific page to go to with quickform. :( > >Thanks, >JC > > > There is a jump function to go do a specific page IIRC. All of this post is entirly from memory, and is guesses, but migth still help :) class BaseForm extends Page() { function buildPage1() { // stuff to build page one // DO NOT ADD BUTTONS HERE } function buildPage2() { // stuff to build page 2 // OR HERE } } class Page1 extends BaseForm () { function build() { parent::buildPage1(); // add buttons } } class Page2 extends BaseForm () { function build() { parent::buildPage2(); // add buttons } } class Page3 extends BaseForm () { function build() { parent::buildPage1(); $this->addElement('submit'.... // button to edit page one, a processor should handle jumping to that page parent::buildPage2(); // add another button here to edit page 2 // add more buttons to complete form } } Might be a load of rubbish, but it's nearly 3am :) Ian

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