I need to create check box list content for Example departments and user can check multiple box.
With drowpdownlist I can load value like this :
model :
public function getsection(){
return array (
CHtml::listData(Csection::model()->findAll(),'section_id','ar_name'),
);
}
view :
echo CHtml::activedropDownList(
$models,
'section_id',
$models->getsection(),
array(
'size'=>'4',
'prompt'=>'أSelect Sections ',
'multiple' => 'multiple',
)
);
So how can I do that with checkboxlist, also how to process values in controller, is it like drowpdownlist ?
You can use Chtml::activeCheckBoxList