$form->input('FieldName');
or
$form->input('FieldName', array('options'=>$arrayValues));
---
Norman Paniagua
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.Norman Paniagua
2010/7/27 hoss7 <hossbit@gmail.com>
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 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
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:
Post a Comment