Make display inline radioButtonList on Yii Framework

By Default Yii display radioButtonList not inline like this :
$form->radioButtonList($model, 'gender', array('M' => 'Male', 'F' => 'Female'))

Change Code like this
$form->radioButtonList($model, 'gender', array('M' => 'Male', 'F' => 'Female'), array( 'labelOptions' => array('style' => 'display:inline'), 'separator' => ' '))
And Voila ... ! Thank's

2 comments:

  1. Thanks for providing such a great information to yii framework. This will make lots of help to Yii Developer.For further references have a look on yiioverflow. We have well expert team in Angular JS, Ionic, Yii Framework, Node JS, Laravel, PHP, MySQL, and WordPress.

    ReplyDelete
  2. Hey thank you so much because i need this code and i found it on your blog thanks a lot. You dont know how big this problem is for me because i am going to give an interview in a company and i think when any company is going to Hire Yii Developer then they ask such code. i don't know i think right or wrong but love you so much for solving my problem.

    ReplyDelete

Featured Post

Install gammu on centos 7

To install Gammu on CentOS 7, follow these steps: 1. Update the system: Bash sudo yum update 2. Install dependencies: Bash sudo yum install...