kayo, on 18 October 2013 - 03:21 PM, said:
try this
<div class="checkboxgroup">
<?php echo $form->checkBoxList($model, 'attribute', CHtml::listData(), array('template'=>'<div><label class="checkbox">{input}{label}</label></div>')); ?>
</div>
css
.checkboxgroup {
overflow:auto;
}
.checkboxgroup div {
width: 130px;
float:left;
}
Thanks man.. I got it by doing some changes in your code.
<div class="checkboxgroup">
<?
echo CHtml::activeCheckBoxList($model, "attribute", CHtml::listData(),array('separator'=>' ','template'=>'<div>{input}{label}</div>'));
?>
</div>
CSS
.checkboxgroup {
overflow:auto;
}
.checkboxgroup div {
width: 230px;
float:left;
}