--- title: Forms --- ## Forms --- Bootstrap framework provides a form feature which you can use to create beautiful html forms easily. Using the bootstrap form gives each individual form element a unified global style. Bootstrap form adds the right spacing and look to each element. Each bootstrap form element should have a class *form-control*. This class is how bootstrap knows which elements to style. All textual elements like **input**, **textarea** and **select** that have *form-control* class will have 100% width by default. There are two types of Bootstrap forms, which are: * Inline form - creates the form on a single line. Useful for login forms in a nav bar * Horizontal form - creates a form with each element in a different row ## Example of a basic form ```html

Example block-level help text here.

``` ## Example of an inline form ```html
``` ## Example of horizontal form ```html
``` ![Inline Form 2](https://github.com/TroyB12/Pictures/blob/master/Inline%20Form2.PNG) ```html
$
.00
``` Bootstrap forms allow the programmer to use classes to easily make HTML forms presentable and responsive. Take the following simple form: ![](https://siamcomm.com/wp-content/uploads/2017/10/Forms-ยท-Bootstrap.png) ```html
We'll never share your email with anyone else.
``` Individual form fields and the associated label should be wrapped in a `
` with a class of `form-group`. One exception to this is when using checkbox field where `form-check` should be used instead of `form-group`. The `` tag should be given a class of `form-control`. The `
``` ![Horizontal Form](https://github.com/TroyB12/Pictures/blob/master/Horizontal%20Form.PNG) #### More Information [Bootstrap Forms](https://getbootstrap.com/docs/4.1/components/forms/)