Thanks - that worked spot on. In fact I shortened it a bit to:
echo $form->input('listname', array('options'=>array('Please choose a
value') + $mylist));
So simple when you know the answer!
Thank you.
On Aug 12, 4:08 pm, Marcelo Andrade wrote:
> > On Aug 11, 9:21 am, arif hossen wrote:
> >>
> On Aug 11, 9:21 am, arif hossen wrote:
>> You can use below code cakephp format.
>>
>> >
>> echo $html->input('listname',array('options'=>$mylist,'Selected'=>'Please
>> select a value));
Cake 1.1?
On Wed, Aug 12, 2009 at 2:51 AM, jburns wrote:
>
> This doesn't add a new value to the list, j
This doesn't add a new value to the list, just selects one that's
already there. I want the list to start of with a custom row that is
not in the database (such as "Please select a value") that will be
selected by default (unless there is already a selection) and the rest
of the list is drawn from
You can use below code cakephp format.
input('listname',array('options'=>$mylist,'Selected'=>'Please
select a value));
?>
On 8/11/09, jburns wrote:
>
>
> How can I add a blank value (something like "Please select a value")
> to the top of a select list when using $this->Xxxx->Yyyy->find
> ('
How can I add a blank value (something like "Please select a value")
to the top of a select list when using $this->Xxxx->Yyyy->find
('list'); instead of defaulting to the first value in the list?
--~--~-~--~~~---~--~~
You received this message because you are subscr