Yii Framework Forum: Radiobutton Yii - Yii Framework Forum

Jump to content

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

Radiobutton Yii Rate Topic: -----

#1 User is offline   ChiragChetan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 40
  • Joined: 20-September 12
  • Location:Mumbai, India

Posted 20 September 2012 - 04:27 AM

<?php echo $form->radioButtonListRow($profilemodel, 'gender', array('Male','Female',)); ?>
when i am retrieving its value by selecting one of the options of radiobutton.im getting value 'o' or '1'.and not 'male' or 'female'.help me...
0

#2 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,359
  • Joined: 12-October 09
  • Location:Croatia

Posted 20 September 2012 - 05:12 AM

It's because

array('Male', 'Female')


is in fact

Array ( 
   [0] => Male 
   [1] => Female 
)


Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   Roman Solomatin 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 182
  • Joined: 21-October 10
  • Location:Tallinn, Estonia

Posted 20 September 2012 - 08:39 AM

You need to use this array:
array('male'=>'Male','female'=>'Female')

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