Checkboxlist Issue

Hello,

I’m very new to Yii and I’m having problems with a contact form I need to add check boxes to.


<div>

<?php echo CHtml::activeLabel($model, Yii::t('Company', 'Modules'), array('class' => 'control-label', 'required' => false)); ?>

   <div>

     <?php

       echo CHtml::checkBoxList($model, 'modules' ,array(

         '0'=>'Mod1',

	 '1'=>'Mod2',

	 '2'=>'Mod3',

	 '3'=>'Mod4',

	 '4'=>'Mod5'

      ));

     ?>

   </div>

</div>

I have a feeling this is just some kind of syntax error. Like I said, I’m new to the Yii framework so this may be a dumb question.

Thanks,

You probably want to use activeCheckBoxList : http://www.yiiframew…kBoxList-detail

BTW, you probably would like to use activeLabelEx as well.

And welcome to the forum!

@yugene Thanks i am also facing this problem thank you for the checkboxlist solution.