Tag Archives: YII CHECKBOXLIST

Checkbox value in ajax request of yii

This is one of the way to send data dynamicallay in ajaxbutton request of yii. When you click on ajaxbutton We will get the selected checkbox value and send this via ajax <?php Yii::app()->clientScript->registerScript(‘checkBoxSelect’, ” function callData(){ fileid= $(\”input[name=’usergroup[]’]:checked\”).map(function() { return this.value; }).get(); return ‘id=’+fileid; } “); ?> <?php echo CHtml::ajaxButton(‘User’,CController::createUrl(‘user/active’), array( ‘type’ =>’POST’, ‘data’=>”js:callData()”, […]

CHtml Checkbox List

Using CHtml class we are creating checkBoxList in yii. This post will help you to understand about how to create checkBoxList in different method, How to assign value, how to get checkBoxList value in controller, checkBoxList value from database, checkBoxList validation in model and checkbox list style. checkBoxList checkBoxList Validation In Model checkBoxList Value In […]