Try with
$form->input('FieldName');
or
$form->input('FieldName', array('options'=>$arrayValues));
---
Norman Paniagua
2010/7/27 hoss7 <[email protected]>
> i have this array:
>
> Array
> (
> [0] => Array
> (
> [Cat] => Array
> (
> [id] => 1
> [title] => cat1
> [status] => 1
> )
>
> [Subcat] => Array
> (
> [0] => Array
> (
> [id] => 3
> [cat_id] => 1
> [title] => sub1-1
> [status] => 0
> )
>
> )
>
> )
>
> [1] => Array
> (
> [Cat] => Array
> (
> [id] => 2
> [title] => cat2
> [status] => 1
> )
>
> [Subcat] => Array
> (
> [0] => Array
> (
> [id] => 1
> [cat_id] => 2
> [title] => sub2-1
> [status] => 0
> )
>
> [1] => Array
> (
> [id] => 2
> [cat_id] => 2
> [title] => sub2-2
> [status] => 0
> )
>
> )
>
> )
>
> )
>
>
> i want create select menu with "optgroups" like this:
>
> <select>
> <optgroup label="cat1">
> <option value="3">sub1-1</option>
> </optgroup>
> <optgroup label="cat2">
> <option value="1">sub2-1</option>
> <option value="2">sub2-2</option>
> </optgroup>
> </select>
>
> what i am must to do in view?
>
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>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 [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