Hello William,
you should use $html->selectTag. You can find its documentation at
http://api.cakephp.org/class_html_helper.html#64b225925057ff1822723aeb636379cd
An example:
if you have a table with columns id and name, you write in your
controller:
$data = $this->YourModel->findAll();
Then you set up your $options in an array of id=>name
foreach($data as $item){
$options[$item[YourModel][id]] = $item[YourModel][name];
}
And finally you send this information to the view
$this->set('options',$options);
And in the view you echo the select box
echo $html->selectTag( 'YourModel/ColumnToStore' , $options );
I hope this will work!
V
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---