yii add a hidden field in form

in views hidden field with model and form: <?php echo $form->hiddenField($model, ‘name’); ?> with value: <?php echo $form->hiddenField($model, ‘name’, array(‘value’=>$value)); ?> or without model <?php echo CHtml::hiddenField(‘name’ , ‘value’, array(‘id’ => ‘hiddenInput’)); ?>

YII CGridView add a custom button like edit,delete,import etc

Add a custom button to YII CGridView like update,delete buttons You can use template property to change order of build-in buttons or add/remove new buttons like this: array( ‘class’=>’CButtonColumn’, ‘template’=>'{delete}{update}’,) In CGridView’s buttons column build upon above example there will be no view button and delete and update buttons will be in other than default… Continue reading YII CGridView add a custom button like edit,delete,import etc