Difference between #6 and #7 of using multiple radio button

unchanged
Title
using multiple radio button
unchanged
Category
Tips
unchanged
Tags
radiobutton, radio, button, activeRadioButton, multiple, value
changed
Content
when we use multiple radio buttons with same name in Yii 
many people have the problem on getting the value of the selected radiobutton.
we can use radioButtonList for that. But if we need to use radioButton itself to
place the button any where in a view.

 we need to have include one more parameter in htmloption array()

**'uncheckValue'=>null**

##Usage
~~~
[php]

echo
CHtml::radioButton('btn',false,array('value'=>'1','name'=>'btnname','uncheckValue'=>null));

CHtml::radioButton('btn',false,array('value'=>'2','name'=>'btnname','uncheckValue'=>null));


//or we can use it in activeRadioButton()


echo
$form->radioButton($model,'name',array('value'=>1,'uncheckValue'=>null));
echo
$form->radioButton($model,'name',array('value'=>2,'uncheckValue'=>null));
~~~
so we can place any where in a page.

regards

**support@nintriva.com**

[Nintriva](http://www.nintriva.com)page