QFC - no underline in form name?
| From: | Daniel Kopp | Date: | Sun, 09 Nov 2003 22:57:43 +0000 |
| Subject: | QFC - no underline in form name? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-8839@lists.php.net to get a copy of this message | ||
Hi!
I got the following - very simplified - code:
<?php
session_start();
require_once 'HTML/QuickForm/Controller.php';
require_once 'HTML/QuickForm/Action/Direct.php';
class form extends HTML_QuickForm_Page {
function buildform()
{
$this->_formBuilt = true;
$this->addElement('submit',
$this->getButtonName('form_2'),
'form_2');
}
}
class form_2 extends HTML_QuickForm_Page {
function buildform()
{
$this->_formBuilt = true;
$this->addElement('submit',
$this->getButtonName('form'),
'form');
}
}
$form =& new form('form');
$form_2 =& new form_2('form_2');
$controller =& new HTML_QuickForm_Controller('TEST',0);
$controller->addPage($form);
$controller->addPage($form_2);
$controller->addAction('form',
new HTML_QuickForm_Action_Direct());
$controller->addAction('form_2',
new HTML_QuickForm_Action_Direct());
$controller->run();
?>
At least here I just get a blank page instead of the second page - when I
click the button. When I change the name to Form1 and Form2 it works or -
when I change the order of the two lines:
$controller->addPage($form);
$controller->addPage($form_2);
To:
$controller->addPage($form_2);
$controller->addPage($form);
It seems that QFC does not like Forms that have an underline in the name -
is that true?
In my actual example I used other names that only have the underline in
common with this example
Would be great to see that in the documentation - or am I missing something
here?
Regards
Daniel