Try a pr($regioni) and see what you get, if it isn't something like
array( 1 => "PIEMONTE", 2 => "..." ) then that is your problem.

On Feb 7, 2008 8:47 AM, Reny <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> I have problem with select form helper
>
> I populate the select in this way
>
> echo $form->select('Regione.idregioni', array('options'=>$regioni),
> null, array('id' => 'regioni'),false);
>
> $options was populate from controller
>
> this is the generate code
>
> <select name="data[Regione][idregioni]" id="regioni">
> <optgroup label="options">
> <optgroup label="Regione">
> <option value="idregioni">1</option>
> <option value="nome">PIEMONTE</option>
> </optgroup>
> </optgroup>
>
> 1) I want no optgroup in my select, I'll tried some possibility as
> 'optgroup'=> false, on label ecc... but without result
>
> 2) I want
> <option value="idregioni">1</option>
> <option value="nome">PIEMONTE</option>
> <select name="data[Regione][idregioni]" id="regioni">
> must begun <option value="1">PIEMONTE</option>
>
> thanks
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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