Yii Framework Forum: radiobuttonlist without model in yii - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

radiobuttonlist without model in yii Rate Topic: -----

#1 User is offline   CRajesh 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 14-September 16
  • Location:Warangal,Telangana,India

Posted 14 March 2017 - 11:33 PM

I have a radiobuttonlist without model is as below
echo CHtml::radioButtonList($name.$category.$x,$yesno,array('1'=>'Yes','0'=>'No',),
array('separator' => "",'id'=>$qustype.$qusid, ) );


and I have inserted the data i.e selected radio button value into the database fine.But when I retrieve the data from database the corresponding radiobutton is not checking..and when I inspect the radiobutton on browser it shows as

<input id="Cr11_0" value="1" type="radio" name="Cr11">
 <label for="Cr11_0">Yes</label> 
<input id="Cr11_1" value="0" checked="checked" type="radio" name="Cr11">
 <label for="Cr11_1">No</label>


from above retrieved value is 0 and it shows checked but on browser , it is not selected when loading..where did I make Mistake ..please any suggestion would be appreciated..
0

#2 User is offline   reykel 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 67
  • Joined: 21-June 15
  • Location:Camaguey, Cuba

Posted 07 April 2017 - 07:52 PM

try to control status via JQuery...
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users