Category Archives: Yii Chtml

CHtml Checkbox

Using CHtml class we are creating checkbox in yii. This post will help you to understand about how to create checkbox in different method, checkbox properties, array value, how to get checkbox value in controller and checkbox validation in model. CheckBox Checked Properties Checkbox Value Checkbox Validation In Model Get Checkbox Value In Controller CheckBox […]

CHtml dropDownList Ajax

I added the code for yii dropdownlist to the following actions like Dropdownlist ajax, Ajax response etc CHtml dropDownList: Ajax CHtml dropDownList: Ajax Response(Ex1) CHtml dropDownList: Ajax Response(Ex2) CHtml dropDownList: Ajax Response(Ex3) CHtml dropDownList: Ajax <?php /** CHtml dropDownList Ajax**/ $type=array(“1″=>”Type 1″,”2″=>”Type 2”); echo $form->dropdownlist($model,’type’,$type,array(’empty’=>’Select Type ‘, ‘ajax’=>array( ‘type’=>’POST’, ‘url’=>CController::createUrl(‘user/type’), ‘data’=>array(‘typeid’=>’js:this.value’), ), )); ?> CHtml […]

CHtml dropDownList Ajax Submit

I added the code to submit the yii form When we select the value from Chtml dropdownlist box. <div class=”search-form” style=”display:block”> <div class=”wide form”> <?php $form=$this->beginWidget(‘CActiveForm’, array( ‘action’=>Yii::app()->createUrl($this->route), ‘method’=>’get’, )); ?> <div class=”row”> <?php echo $form->labelEx($model,’type’); ?> <?php $types=array(“1″=>”Type1″,”2″=>”Type2″); echo $form->dropDownList($model,’type’,$types, array( ‘onchange’=>CHtml::ajax(array( ‘success’=>”$(‘.search-form form’).submit()”, )), ) ); ?> </div> </div> </div>

CHtml Dropdownlist

Using CHtml class we are creating dropDownList in yii framework. This post will help you to understand about how to create dropDownList in different method, How to assign value, how to get dropDownList value in controller, dropDownList value from database, dropDownList validation in model yii framework. Default Empty DropDownList DropDownList Value In Controller DropDownList Event […]

CHtml FileField

Using CHtml class we are creating fileField in yii framework. This post will help you to understand about how to upload file in different method, how to get and save the uploaded file in controller, file validation in model yii framework. Syntax activeFileField With CHtml fileField With Form fileField With CHtml (Without Model Name) File […]

CHtml ListBox

CHtml::listBox() function is used for creating ListBox in yii framework. This post will help you to understand about how to create ListBox in different method, How to assign value, how to get ListBox value in controller, ListBox value from database in yii framework. Syntax ListBox Static Values For ListBox ListBox Values From Database Listbox Group […]

CHtml Radio Button

Using CHtml class we are creating radioButton in yii. This post will help you to understand about how to create radioButton in different method, radioButton properties, array value, how to get radioButton value in controller and radioButton validation in model. radioButton Checked Properties radioButton Value radioButton Validation In Model Get radioButton Value In Controller RadioButton […]

CHtml Radio Button List

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

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 […]