Tuesday, 10 September 2013

how to add class inside checkbox and label field

how to add class inside checkbox and label field

i want to implement this html code into yii format.
<input type="checkbox" name="" class="checkbox1" onclick="" id=""/>
<label class="gender" for="" id="">Female</label>
i tried to implement this code.
$form->checkBox($model,'gender',array('class'=>'gen'),array('template'=>'{label}')
but i don't know how to assign gender css class to label field? could
please suggest me how to implement above html code in right way.

No comments:

Post a Comment