Help styling form inputs with bootstrap\ActiveForm

I’m a little confused with the documentation on how to display some form fields side by side.

I have started with the basic




    <?php $form = ActiveForm::begin([

        'layout' => 'horizontal',

        'action' => ['index'],

        'method' => 'get',

        'fieldConfig' => [

            'horizontalCssClasses' => [

                'label' => 'col-sm-2',

                'offset' => 'col-sm-offset-2',

                'wrapper' => 'col-sm-4',

            ],

        ],

    ]); ?>



but i can’t figure out how to place the fields in 2x2 grid - ie, i have 4 fields and i want them in 2 groups of 2 side by side.

Can anyone help me make out the docs on how to do it with the bootstrap/ActiveForm so i don’t have to add css by hand ?

thx

You could try using Kartik form builder: http://demos.krajee.com/builder

ok but surely i can do it easy enough with normal activeForm ? :unsure:

I would just wrap standard html around the php…or, if you want to reuse, then wrap that bit of code as a component.