Hi,
I am getting an array of objects from my findAll method. Now I want to render a checkbox for each object inside the array. Is there already a way with Yii?
I saw checkboxList but this is not what I am looking for, as I do not want to have multiple selects!!
controller
$model = $category->descendants()->findAll();
view
echo $form->checkboxListRow($model, 'name',
CHtml::listData(Category::model()->roots()->findAll(),'id','name'),
array(
'class' => 'root-category',
)
);
The code from the view is not working quite well, as I am having multiple selects The goal with this checkboxes is to filter a gridview based on the selection of the checkboxes. Thats why I cannot have multiple selections!
Thanks in advance.