bas_vdl
(Bas Vdl)
January 13, 2013, 3:57pm
1
Can somebody help me with exteding the CActiveForm::checkBoxList.
Default the layout from the checkBoxList is:
<label class="checkbox">Option one is this and that—be sure to include why it's great</label>
<input type="checkbox" value="">
But im using bootstrap framework and for that you need the following structure:
<label class="checkbox">
<input type="checkbox" value="">
Option one is this and that—be sure to include why it's great
</label>
Thank you in advanced!
alirz23
(Alirz23)
January 13, 2013, 5:48pm
2
you dont have to use CActiveForm::checkBoxList() there is CHtml::checkBoxList() make use of that
example
<?php echo CHtml::label("Option one is this and that—be sure to include why it's great<br />".CHtml::checkBoxList('fieldName', 'id', array('first', 'second')), 'fieldName'); ?>
bas_vdl
(Bas Vdl)
January 14, 2013, 7:28pm
3
alirz23:
you dont have to use CActiveForm::checkBoxList() there is CHtml::checkBoxList() make use of that
example
<?php echo CHtml::label("Option one is this and that—be sure to include why it's great<br />".CHtml::checkBoxList('fieldName', 'id', array('first', 'second')), 'fieldName'); ?>
That doesn’t give me de layout of a checkbox wrapped by a label