I am new to cake PHP. I want to load a combobox in a form. hw can i do it ?? also i m using jquery but don't want to use prototype lib for js. thanx in advance.
+1
A:
write in controller
$cats = $this->Articles->Categories->find('list');
$this->set(compact('cats'));
in view
echo $form->select('categories', $cats);
Aziz
2010-02-14 18:24:24
It's always a good idea to conform to the cake conventions because it makes everything easier in the long run. So instead of using `$cats` in the controller, use `$categories` so that in view you can do just `echo $form->input('category_id');` or `echo $form->input('Category');`.
Marko
2010-02-14 18:43:07
thanx..i did it using requestAction method...as far as auto complete is concerned i m doing it explicitly through jquery.
Anshul Rathi
2010-02-15 11:07:35
sure it is. I just wanted to show it technique :-)
Aziz
2010-02-17 12:44:21