Re: QFC: auto-submit without advancing to next step?

From: Date: Thu, 02 Sep 2004 10:30:05 +0000
Subject: Re: QFC: auto-submit without advancing to next step?
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14380@lists.php.net to get a copy of this message
Hi! Daniel Kopp wrote: >> another problem, is there a way to bypass validation when doing a >> back-action? right now i have to fill everything on the active >> page to step back, this shouldn't be the case, if i see i did a >> wrong option on the last page and this changes the active page, i >> shouldn't need to fill in everything right now... > > use custom Actions. Then you need to call (or not call) validation > yourself. Was that too little info? here you go: class CustomBackward extends HTML_QuickForm_Action_Submit { function perform(&$page, $actionName) { $page->buildForm(); // if ($page->validate()){ //not calling this does mean not to use validation $container =& $page->controller->container(); $container['values']['pagename']=$page->exportValues(); // then u might do: $page->controller->handle($page,'lastpage'); //} kept this braket plus validation in //to show how to use validation in custom Actions $page->handle('display'); } } hope that helps - though I did not test it regards Daniel

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