http://api.cakephp.org/class/form-helper#method-FormHelperselect
(hint look at the last param)

http://book.cakephp.org/view/204/Form-Element-Specific-Methods#select-728
 (hint look at the last param)

-- 
(the old fart) the advice is free, the lack of crankiness will cost you

- its a fine line between a real question and an idiot

http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/
http://blog.samdevore.com/cakephp-pages/my-cake-wont-bake/
http://blog.samdevore.com/cakephp-pages/i-cant-bake/



On Fri, Mar 13, 2009 at 6:15 PM, Dave Maharaj :: WidePixels.com
<d...@widepixels.com> wrote:
>
> Thanks, it’s a bit closer.
>
> That did get rid of the 1 and 2 that was showing in the drop down. Only
> thing is there is still a blank field at the top.
> Dave
>
> -----Original Message-----
> From: Samuel DeVore [mailto:sdev...@gmail.com]
> Sent: March-13-09 10:43 PM
> To: cake-php@googlegroups.com
> Subject: Re: Select input
>
>
> echo $form->select('level',
> array('0'=>'Low','1'=>'Medium','2'=>'High'), array('selected'=>'0'));
>
> try that
> On Fri, Mar 13, 2009 at 5:55 PM, Dave Maharaj :: WidePixels.com
> <d...@widepixels.com> wrote:
>> I been looking at the API for this and still cant get it right.
>> API echo $form->select( $fieldName, $options = array ( ), $selected =
>> NULL, $attributes = array ( ), $showEmpty = '' )
>>
>> Can someone tell me whats wrong with this?
>>
>> echo $form->select('level',  array(array('0'=>'Low'),
>> array('1'=>'Medium'), array('2'=>'High')), array('selected'=>'Low'));
>>
>> It looks like this in the dropdow:
>> ____________
>> 'blank entry'
>> Low
>> 1
>> Medium
>> 2
>> High
>>
>> Thanks,
>>
>> Dave
>> >
>>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to