- You should use syntax like echo $form->select('active', array(0 => 'Yes',
1 => 'No'));

On Fri, Apr 25, 2008 at 3:56 PM, rtanz <[EMAIL PROTECTED]> wrote:

>
> tried that and got this error
>
> Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/jpgalea/
> public_html/survey/app/views/surveys/edit.ctp on line 9
>
> On Apr 25, 12:08 pm, seb <[EMAIL PROTECTED]> wrote:
> > rtanz wrote:
> > > hi i would like to make a select box with a label and dropdown,
> > > default value 'Yes' and no empty value. I am trying this code but its
> > > not working as i want to, can you help me out?
> >
> > With Cake 1.2, you should try this :
> >
> > echo
> >
> $form->input("type"=>"select","options"=>array("0"=>"No","1"=>"Yes"),"selected"=>"1"));
> >
>


-- 
Regards,
Amit

http://amitrb.wordpress.com/
http://coppermine-gallery.net/
http://cheesecake-photoblog.org/
http://www.sanisoft.com/blog/author/amitbadkas

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

Reply via email to