我一直在寻找
Cookbook – 7.3.3 Automagic Form Elements试图找到一种方式让单选按钮水平排列而不是垂直排列.我一直在看’div’=> ‘class_name’$options也是$options [‘between’],$options [‘separator’]和$options [‘after’]但是不成功.这样做有“蛋糕”方式吗?
<?=$form->input('Product Type',array( 'type' => 'radio','id' => $tire['ProductType']['id'],'name' => $tire['ProductType']['id'],'options' => array(2=>'Tire Manufacturer',7=>'Rim Manufacturer '),));?>
相当于此
<label>Product Type</label> <div style="padding-top:5px;"> <input type="radio" name="data[Manufacturer][product_type_id]" value="<?=$tire['ProductType']['id']?>"> Tire Manufacturer <input type="radio" name="data[Manufacturer][product_type_id]" value="<?=$wheel['ProductType']['id']?>"> Rim Manufacturer </div>