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