i use $form->input

but i cant create best 'options'=>$arrayValues for that input.

my field name is usercats and i have this:
$form->input('usercats')

and in SubcatsController i have:
$usercats = $this->Subcat->Cat->find('all');
                $this->set(compact('usercats'));

i can load all data but i want create data 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>

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

Reply via email to