Capturing Selected Values Of Checkboxlist

I am trying to capture the multiple selected values of Yii checkBoxList.

Here is my view code:

  <div class="row">

   <?php echo $form->labelEx($model, 'comfortFeatureIDs', array('class' => 'bold')); ?><br/>

    <?php echo $form->checkboxList($model, 'comfortFeatureIDs', $model->comfortFeatures ); ?> 

    <?php echo $form->error($model, 'comfortFeatureIDs'); ?>


In the controller, I can not capture the selected values.

I have tried this with no luck.

 if (isset($_POST['AdBuilderFormOne'])) {


            # collect posted form data and store them in form attributes  	

            $adBuilderFormOne->attributes = $_POST['AdBuilderFormOne'];


			# validate if we have received good data 

			if ($adBuilderFormOne->validate()) {

				# process the collected data and redirect the user to Ad Builder Form Two  


				# var_dump($adBuilderFormOne->comfortFeatureIDs);







				# set flash message 



I received NULL from comfortFeatureIDs in the controller.

My question is how do I capture the multiple selected values of the checkBoxList.

Please advise!

I found the solution at last.

and this codes work for me.

$comfortFeatureIDs = $_POST[‘AdBuilderFormOne’][‘comfortFeatureIDs’];