tags:

views:

59

answers:

1

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
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
thanx..i did it using requestAction method...as far as auto complete is concerned i m doing it explicitly through jquery.
Anshul Rathi
sure it is. I just wanted to show it technique :-)
Aziz