Yii checkBoxList Tutorials

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.checkBoxListcheckBoxList Validation In ModelcheckBoxList Value In ControllerSelected checkbox List Value From Databasecheckbox List StylecheckBoxListUsing below code, we can create checkbox list in different way. […]... Read More »

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()", //or append data here 'url'=> 'user/active', ), array('id'=>'activebtn') ); ?>... Read More »