转自:
横排:
echo $form->radioButtonList($Model, ‘type’,$arrtype,array(‘template’ => ‘<li style=”display:inline-block;120px;”>{input} {label}</li>’,'separator’ => ”))
主要是display:inline-block
去<br>:
echo $form->radioButtonList($person,’gender_code’, array(‘m’=>’Male’,'f’=>’Female’),array(‘separator’=>”));
把 separator 设为空就行了
自己的代码:
<?php echo $form->radioButtonList($model, 'version', Job::model()->getversions(), array('template' => '<li style="display:inline-block;120px;">{input} {label}</li>', 'separator' => ' ')); ?> // 或者
<?php echo CHtml::radioButtonList('version','0', Job::model()->getversions(), array('template' => '<li style="display:inline-block;120px;">{input} {label}</li>', 'separator' => ' ')); ?>