Yii Framework Forum

FormBuilder (kartik\builder\Form) putting Radio buttons on same line as label


(John) #1

I am using the @kartikv FormBuilder extension to create my input forms.
Everything seems to work except the html generated by Form::INPUT_RADIO_BUTTON_GROUP.
The html should be displayed with the label above the actual input field. The searchname field ( as well as 7 other fields ) are working as expected. I have it configured for ‘vertical’ orientation. It looks like the radio group is not paying attention to this option and seems to be displaying it as ‘horizontal’ orientation.
I have played with the actual code in my browser, and if I insert a
tag after the label markup it looks great…
Here is the code.

'searchactive'=>[
    'label'=>'Active',
    'items'=>[0=>'Active', 1=>'Inactive', 2=>'All'],
    'type'=>Form::INPUT_RADIO_BUTTON_GROUP,
],
'searchname'=>[
    'type'=>Form::INPUT_TEXT, 'options'=>['placeholder'=>'Enter full or partial Session name...']],

Thanks
John Scott