Question Regarding HTML_QuickForm and Add Group
| From: | Sanjay | Date: | Wed, 31 Dec 2003 08:51:52 +0000 |
| Subject: | Question Regarding HTML_QuickForm and Add Group | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-9886@lists.php.net to get a copy of this message | ||
I want to display fields on same line, I have read that we can do with
group but why all group examples uses &HTML_QuickForm::createElement. Is it
not possible to just use with add element
$form = new HTML_QuickForm('frmTest', 'post');
$form->addElement('header', 'MyHeader', 'Employee');
$form->addElement('text', 'Empno', 'Emp Id:');
$form->addElement('text', 'Ename', 'Name:');
How to use addGroup for addElement ?
$form->addGroup(?????)
I have seen examples like this which uses createElement:
$name['last'] = &HTML_QuickForm::createElement('text', 'last');
$name['last']->setSize(30);
$name['first'] = &HTML_QuickForm::createElement('text', 'first');
$name['first']->setSize(20);
$form->addGroup($name, 'name', 'Name (last, first):',
', ');