Monday, February 1, 2010

Re: need some help with a select

try:

$form->input('**fieldname**', array('empty' => true));

...where **fieldname** is the field you want to display. This will give you a populated drop down but the first entry will be an empty row. Is this what you wanted?

Jeremy Burns
jeremyburns@me.com
(Skype) +44 208 123 3822 (jeremy_burns)
(m) +44 7973 481949
(h) +44 208 530 7573

On 1 Feb 2010, at 09:42, Ernesto wrote:

> Hello.
>
> i need a select box, wrapped in his "<div class='input select'>" div
> and with blank first entry
>
> $form->input() ---> the select didn't have the empty field
> $form->select() ---> the select wasn't wrapped in his DIV
>
> any suggestion?
>
> ps: i'm using Cake 1.3Beta
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
>
> 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: