Skip to main content

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

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

Post a Comment

Popular posts from this blog

Repair Centos Metadata Corruption

To repair disk error on Centos 7. Use a Gparted disk that can be uploded in .... 1. Boot through gparted. 2. Go to the terminal 3. Check disk mapper by typing> fdisk -l For fdisk results 4. typed> sudo xfs_repair -L / dev / mapper / centos-home 5. Restart Centos 7 Hope can help readers of this blog

Ubuntu 10.10 Can not Select Framework on Netbeans 6.9.1

When we create new Project and want to select Framework like ' Java Server Faces ' or other there is a check box that can not be check :(. This Problem because Java Platform (java-6-open-jdk) is not Compatible with Ubuntu 10.10 . The solution is try using 'java-6-sun' on Synaptic known as 'sun-java6-jdk' Edit netbeans.conf and change netbeans_jdkhome="/usr/lib/jvm/java-6-sun"

Access Pidgin from Squid Proxy

In my Office some person like using Pidgin as Chatting tools to connect to Yahoo messager. Because my office using Squid as Proxy server, some modification of squid.conf is adding. This line below (red bold) you must add on squid.conf. acl SSL_ports port 443 acl SSL_ports port 5050 acl Safe_ports port 80 acl Safe_ports port 21 acl Safe_ports port 443 acl Safe_ports port 70 acl Safe_ports port 210 acl Safe_ports port 1025-65535 acl Safe_ports port 280 acl Safe_ports port 488 acl Safe_ports port 591 acl Safe_ports port 777 acl CONNECT method CONNECT acl shoutcast rep_header X-HTTP09-First-Line ^ICY\s[0-9] acl apache rep_header Server ^Apache Restart Squid : #service squid restart Try connect from pidgin. If any problem don't be ashame to put comment in this post. Thank's .