laravel-form-builder
laravel-form-builder copied to clipboard
[Question] - How to make form with 2 or 3 columns?
Hi @kristijanhusak,
Thanks for your great package.
My admin template form has 3 bootstrap column (col-md-9 & col-md-3). I don't know how to separate form fields into 2 parts.
Ex:
$this->container('left_form')->add(...)->add(..)->container('right_form')->add(...);
If your package is not including that feature, please help me add it if you can :)
Thank you!
You can split them up in view.
{{! form_start($form) !}}
<div class="row">
<div class="col-md-9">
{{! form_row($form->left_field_1) !}}
{{! form_row($form->left_field_2) !}}
</div>
<div class="col-md-3">
{{! form_row($form->right_field_1) !}}
{{! form_row($form->right_field_2) !}}
</div>
</div>
{{! form_end($form) !}}
Or if you use child forms, you can just print one form in left side, and another form in right side.