HTML_Quickform_Controller Jump issue.

From: Date: Fri, 04 Jun 2004 10:18:35 +0000
Subject: HTML_Quickform_Controller Jump issue.
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-12893@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm using the function below as the action handler for Page0 in my multipage wizard, however I can only seem to get jumps to page0 or page1 working, jumping to any other page results in page1 (the next page) being shown. I have attached the function inline, and the entire form code as an attachement (which quite possibly makes a good example that could be added to the quickform_controller package, as it shows form pages that are created dynamically depending on options from previous forms. Kind Regards, Ian class Page0ActionNext extends HTML_QuickForm_Action_Next { function perform(&$page, $actionName) { // save the form values and validation status to the session $page->isFormBuilt() or $page->buildForm(); $pageName = $page->getAttribute('id'); $data =& $page->controller->container(); $data['values'][$pageName] = $page->exportValues(); $data['valid'][$pageName] = $page->validate(); // Modal form and page is invalid: don't go further if ($page->controller->isModal() && !$data['valid'][$pageName]) { return $page->handle('display'); } $status = 1; if ($status == 1) { $nextName = 'page0'; } elseif ($status == 2) { $nextName = 'page5'; } else { $nextName = 'pageUnavailible'; } $next =& $page->controller->getPage($nextName); $next->handle('jump'); } } -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAwEyFEe6ncNCcEO0RAtEsAJsGVwJpeKiFcXIYRaVP2p9IdhhFtgCgyrhQ acq0vUZ6unEqFiIfA8a0jLk= =8PyD -----END PGP SIGNATURE-----

Attachment: [application/x-php] index.php
« previous php.pear.general (#12893) next »