QuickForm_Controller Wizard question
| From: | David Dahl | Date: | Thu, 25 Sep 2003 00:15:59 +0000 |
| Subject: | QuickForm_Controller Wizard question | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-8024@lists.php.net to get a copy of this message | ||
I am trying to use the QuickForm_controller class with dynamically-generated forms from metadata in a database.
I cannot figure out how to deal with the $wizard->addAction('process', new ActionProcess());
here is how i set up the forms:
class fbPage extends HTML_QuickForm_Page
{
function buildForm()
{
$this->_formBuilt = true;
//Add elements and rules here via database queries below...
}
}
$page = new fbPage($form_label);
//print section header
$page->addelement('header','<strong>$getSections->section_name</strong>' );
$page->addelement('hidden',"f", $f );
//etc...
//now i set up the wizard:
$wizard =& new HTML_QuickForm_Controller('Wizard');
//I have an array of "page" objects, 12 of them
foreach ($page_array as $form_){
$wizard->addPage($form_);
}
//how do i add this:
$wizard->addAction('process', new ActionProcess());
so i can continue to the next form in the array?
is there something I am missing? After I click the Next button , it never continues to the next form. In the wizard example, there is always $_GET data even though the form is set to $_POST. like this: http://test.com/wizard.php?_qf_page3_display=true
my forms don't produce the $_GET data.
I am sure it is something stupid on my part...
david
The significant problems we face cannot be solved by the same level of thinking that created them. -Albert Einstein