Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build an inline form with multiple rows with Bootstrap v4?

Using Bootstrap v4, how can you build a form like the one seen below?

I'm trying to understand if I should be using form-inline with either multiple form-groups or multiple rows?

https://v4-alpha.getbootstrap.com/components/forms/

FORM

like image 388
AnApprentice Avatar asked Jun 30 '17 02:06

AnApprentice


People also ask

How do I create a form element inline in bootstrap?

To create a form where all of the elements are inline, left aligned and labels are alongside, add the class . form-inline to the <form> tag.

Which bootstrap 4 class is used to create inline form on a webpage?

Additional rule for an inline form: Add class .form-inline to the <form> element.

How do I create a horizontal form in bootstrap?

Horizontal formCreate horizontal forms with the grid by adding the .row class to form groups and using the .col-*-* classes to specify the width of your labels and controls. Be sure to add .col-form-label to your <label> s as well so they're vertically centered with their associated form controls.


1 Answers

You'll want to use form-group and fieldset

form-group groups the input elements on the same line

fieldset makes the label appear above the input

Jsfiddle: https://jsfiddle.net/5wbeqmgc/2/

Not perfect, but a simple example using columns: https://jsfiddle.net/5wbeqmgc/4/

like image 64
Brian Putt Avatar answered Sep 30 '22 06:09

Brian Putt