BWSnippet

Yii CheckboxList as actual list

Yii CheckboxList as actual list

<ul class="inlineCheckBoxList">
<?php
$Data = CHtml::encodeArray(CHtml::listData(Tag::model()->findAll() ,'id','name' ));
  echo CHtml::checkBoxList('mytags','mytags', $Data,
    array('separator'=>' ' , 'template'=>'<li>{label}{input}</li>')
  );
?>
</ul>

Tags

Yii CheckboxList as actual list