I have two database tables; Sections and Categories.
Where Sections is:
----+----------
id | name
----+----------
1 | fruits
----+----------
2 | flowers
----+----------
and tbl Categories is;
----------------+------------
id | name | section_id
----+-----------+------------
1 | apple | 1
----+-----------+------------
2 | banana | 1
----+---------- +------------
3 | rose | 2
----+-----------+------------
4 | jasmine | 2
----+---------- +------------
I want to create dropdownlist like this:
Select Category:
Fruits
Apple
Banana
Flowers
Rose
Jasmine
Where Sections items can’t be select.
I don’t have idea how create that with Chtml::dropDownlist.
Thank for help