I have this radioList:
Html::radioList('name,null,$array['class' => 'form-control']);
It genegated vertical radioList, but I want it horizontal.
I have this radioList:
Html::radioList('name,null,$array['class' => 'form-control']);
It genegated vertical radioList, but I want it horizontal.
<?=Html::activeRadioList($model, $attribute, [1 => 'option1', 2 => 'option2'], [
'item' => function ($index, $label, $name, $checked, $value) {
return '<label class="radio-inline">' . Html::radio($name, $checked, ['value' => $value]) . $label . '</label>';
}
])?>