Re: Quickform - can you add an emptyOption to a select-type element?
| From: | arnaud sellenet bodin | Date: | Wed, 04 Jan 2006 18:58:56 +0000 |
| Subject: | Re: Quickform - can you add an emptyOption to a select-type element? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22433@lists.php.net to get a copy of this message | ||
By curiosity I checked in DB_DataObject_FormBuilder code to see how it creates an empty option for elements in $fb_selectAddEmpty. Herre it is :
if (in_array($key, $this->selectAddEmpty)
|| !($type & DB_DATAOBJECT_NOTNULL)) {
$options = array('' => $this->selectAddEmptyLabel) + $options;
}
Le 4 janv. 06, à 19:30, l Burnerheimerton a écrit :
I tried: $form->addElement('select', 'nameList', 'Names', $nameList, array('addEmptyOption'=>TRUE)); And it NOT add an empty option to the list. Can you add an empty option and if so, how? Thanks __________________________________________ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php \ | /Arnaud Sellenet-Bodin Dév et dés http://demental.info Tel : 05 63 55 24 46 / | \