Re: FormBuilder -- add header options to auto-linked select menus
| From: | Norbert Mocsnik | Date: | Wed, 18 Aug 2004 21:44:24 +0000 |
| Subject: | Re: FormBuilder -- add header options to auto-linked select menus | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-14172@lists.php.net to get a copy of this message | ||
Justin Patrin wrote:
Use something like this in your DataObject class: function postGenerateForm(&$form) { $sel =& $form->getElement('selectElementName'); $sel->addOption(...); }Afaik this will add the option to the end of the list. This is why I implemented fb_selectAddEmpty in FormBuilder (was it me?) .. that could be improved in a future version so it can add arbitrary text as the first option to the list. -- Regards, Norbert Mocsnik http://norbert.mocsnik.hu/ _________________________________ contact me for affordable multi- domain developer hosting packages