Two questions about HTML_QuickForm

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chu2654
Forum Newbie
Posts: 11
Joined: Mon Aug 07, 2006 6:59 pm

Two questions about HTML_QuickForm

Post 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 ?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

-- deleted, not useful --
Last edited by volka on Fri Aug 25, 2006 3:30 am, edited 1 time in total.
jamiel
Forum Contributor
Posts: 276
Joined: Wed Feb 22, 2006 5:17 am
Location: London, United Kingdom

Post 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);
Post Reply