Re: help making a skip page sistem in HTML_QUICKFORM_CONTROLLER
| From: | Mark Wiesemann | Date: | Mon, 23 Apr 2007 20:10:31 +0000 |
| Subject: | Re: help making a skip page sistem in HTML_QUICKFORM_CONTROLLER | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27126@lists.php.net to get a copy of this message | ||
Valentin Ceaprazaru wrote:
> I need to make a sistem so that i can skip portions of a survey
> I have attached the script. I get the questions dynamicaly from a DB, i'
> attached this also.
Without having a look at your rather long code, the general idea is to
mark the skipped pages as valid. The example code of QFC contains a line
like the following in the class that extends HTML_QuickForm_Action_Next
in the method perform():
$data['valid'][$pageName] = $page->validate();
You need to do something similar with the names of the pages that you
want to skip. Instead of calling $page->validate(), you simple set the
value to (boolean) true.
BTW: There is no need to tell the public about your database
credentials, especially if the server seems to be reachable from
anywhere.
Regards,
Mark
--
http://www.markwiesemann.eu