Hi,
Iam trying to implement dependent check boxes in Yii. I have 2 tables named category and sub category. Categories are listed as checkboxes using the code
<?php echo CHtml::checkBoxList(
'Category',
array(),
CHtml::listData(Category::model()->findAll(),'category_id','category'),
array( 'checkAllLast'=>false,
'class'=>'categoryFilter',
)
);?>
When selecting one checkbox the corresponding subcategories related to that category must list as check boxes.How can I implement it.
Category table contains category_id and category and Sub_category table contains subcategory_id, category_id and subcategory