Bootstrap V2 Forms
In this tutorial, you will learn how to create forms using the Bootstrap 2.0 toolkit.
Bootstrap has already defined styles for form controls such as input, textarea, and select, supports lists and checkboxes, and defines styles for disabled form controls, including error, warning, and success states for each form control.
Starting from version 2.0, Bootstrap provides four types of form layouts:
* Vertical (default)
* Search
* Inline
* Horizontal
In the previous version of Bootstrap, the default form layout was horizontal. However, since version 2.0, the vertical layout has become the default.
The default Bootstrap form layout (i.e., the vertical form) is styled by the .form-vertical class in bootstrap.css. Since this is the default layout, there is no need to specify the .form-vertical class when creating a form using the default layout. The following example demonstrates a form created using Bootstrap 2.0's default form layout.
The .well class is used to create a container for the form (of course, it also has other uses). This class can be found in bootstrap.css lines 1650 to 1663. For this layout, input fields are (#). The following example shows how to create a default form layout using Bootstrap.
## Example
Related help documentation!
## View Online
[View the above example in different browser windows.](#)
A search form is created using the .form-search class located in bootstrap.css lines 962 to 1003 (these lines also include the styles for .form-inline). For this layout, input fields are (#). Here is an example:
## Example
</form
## View Online
[View the above example in different browser windows.](#)
An inline form is created using the .form-inline class located in bootstrap.css lines 962 to 1003 (these lines also include the styles for .form-search). For this layout, input fields are (#). Here is an example:
## Example
</form
## View Online
[View the above example in different browser windows.](#)
A horizontal form is created using the .form-horizontal class in bootstrap.css. For this layout, input fields are (#). Here is an example:
## Example
YouTip