Adding a css class to specific items of Yii active checkBoxList
问题 Working with Yii and active checkboxlist. I know the params. I need to add a flag css class to the items. This is my code: $form->checkBoxList($model, 'items', $selected, array( 'class'=>'default_class' )); This code just adds a default_class to every item. But I need a different class for specific items. 回答1: @XIII, I had updated my answer $form->checkBoxList($model, 'items', $selected, array( 'options' => array( 'value1'=>array('disabled'=>true, 'label'=>'value 1'), 'value2'=>array('label'=