I’m using the text field in advanced search. Now, I need to convert the text field ‘Reviewed Date’ into 2 radio buttons ‘Reviewed’ and ‘Not reviewed’. Reviewed button should present all the rows with ReviwedDate not null and Reviewed with null values. I’m using the _search.php for this.
Hi,
If you are using CActiveForm in _search.php like the below
<?php $form=$this->beginWidget('CActiveForm', array(
'action'=>Yii::app()->createUrl($this->route),
'method'=>'get',
)); ?>
then you can use
$form->radioButtonList($model,'attribute','data','htmloptions');
For more information check this link
http://www.yiiframework.com/doc/api/1.1/CHtml#activeRadioButtonList-detail
