Page 1 of 1

Two questions about HTML_QuickForm

Posted: Fri Aug 25, 2006 3:07 am
by chu2654
Hello,
I have two questions about HTML_QuickForm
(1) How can I assign the action of a form ?
(2) How can assign different options and values of a "select" element ?

Posted: Fri Aug 25, 2006 3:22 am
by volka
-- deleted, not useful --

Posted: Fri Aug 25, 2006 3:25 am
by jamiel
You pass the action as a parameter to the constructor. It is the 3rd paramater.

Code: Select all

$form = new HTML_QuickForm($formName, $method, $action);
You pass the select an array of values:

Code: Select all

$options = array('foo', 'bar');
$form->addElement('select', 'mySelect', 'Select: ', $options);