sorry, if you wanted a Dropdown ( select )...

here it goes:

[ controller ]
// That's to create the array of OPTIONS in the Select [ thinking you
have a "categories" table on your DB ]
$this->set('mycat',$this->Category-
>generateList(null,null,null,'{n}.Category.id','{n}.Category.name'));

[ view ]
// That's for the form... to show the Select
<?php echo $html->selectTag('Category/root',$mycat,
$mycat,array('id'=>'categories'),null,false,false); ?>

[ controller ]
// That's to read what was send on the Select
$this->Session->Write('mycat',$this->data['Category']['root']);

Rohman
http://www.rohmansama.com


--~--~---------~--~----~------------~-------~--~----~
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