How To Set Id And Class For Textfield

When i try to set id and class for textField, nothing happens.

My code




<?php  echo $form->checkBox($options,'right', array('id'=>'right','class'=>'selector')); ?>

    <?php echo $form->label($options,'right'); ?>



if I delete id class work pretty good but with id attr textField can’t see class

How can i fix this problem?

P.S

Sorry , my English really not good!

Hi,




<?php echo $form->checkBox($model,'web_status',array('value'=>1, 'uncheckValue'=>0,'disabled'=>false, 'id'=>'youcan','class'=>'cssclass')); ?>



Try like above… i am getting id and class

thank you , but it doesn’t work

I want this html code


<input id ="left" class='selector' type="checkbox" value="left"/>

    &nbsp;<label for="left">Слева</label>

add in my yii project

can you help me? ::)

For me this code got generated





		<label for="Programm_pgm_web_status">Web Status</label>		

		<input id="ytcan" type="hidden" value="0" name="Programm[pgm_web_status]">

		<input value="1" disabled="disabled" id="can" class="kumar" name="Programm[pgm_web_status]" type="checkbox">				



but your code is different





<input id ="left" class='selector' type="checkbox" value="left"/>  // value should 0 or 1

    &nbsp;<label for="left">Слева</label>