Re: QF select element : first line blank ?
| From: | Massimiliano Arione | Date: | Thu, 20 Oct 2005 09:22:55 +0000 |
| Subject: | Re: QF select element : first line blank ? | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21559@lists.php.net to get a copy of this message | ||
Pierre-Yves Stucki wrote:
I'm quite new to PEAR. I formerly used ADOdb and now would like to go one with PEAR::DB and QuickForm (together with Template_Sigma). I'm trying to create a select element, based on data fetched from a database, but I can't find how to indicate that I want the first line in my select element to be blank. You will find below an example of the code I'm using to do it. What do I have to change in order to add a first line blank ? $form->addElement('select', 'type', 'Type :', $agenda_types);simply add an array with an empty value: $form->addElement('select', 'type', 'Type :', array('') + $agenda_types); -- Massimiliano Arione http://garakkio.altervista.org