Re: Another QuickForm question
| From: | Bertrand Mansion | Date: | Fri, 14 Mar 2003 12:33:40 +0000 |
| Subject: | Re: Another QuickForm question | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-4239@lists.php.net to get a copy of this message | ||
<ckline@rightcode.net> wrote :
> That did it! Thanks Brad.
>
> - Charles
>
> On Friday, March 14, 2003, at 01:47 AM, Brad Hubbard wrote:
>
>> How 'bout;
>>
>> $form_get_p->addElement('select', 'person', 'Edit
>> Person:', null);
>> $select = &$form_get_p->getElement('person');
>> $select->setSize(1);
>> $select->setMultiple(false);
>> $select->addOption( 'Select From Results', '-1' ); // or 0 or 10000
>> $select->loadArray( $qper );
>
You could also do:
$options = array('' => 'Default option') + $qper;
$form_get_p->addElement('select', 'person', 'Edit Person:',
$options);
Instead of all the above lines.
Good luck,
Bertrand Mansion
Mamasam