Example block-level help text here.
Use Bootstrap's predefined grid classes to align labels and groups of form controls in a horizontal layout by adding .form-horizontal
to the form (which doesn't have to be a <form>
). Doing so changes .form-group
s to behave as grid rows, so no need for .row
.
Add the disabled
boolean attribute on an input to prevent user interactions. Disabled inputs appear lighter and add a not-allowed
cursor.
Add .form-inline
to your form (which doesn't have to be a <form>
) for left-aligned and inline-block controls.
Set heights using classes like .input-lg
, and set widths using grid column classes like .col-lg-*
.
Bootstrap includes validation styles for error, warning, and success states on form controls. To use, add .has-warning
, .has-error
, or .has-success
to the parent element.
Extend form controls by adding text or buttons before, after, or on both sides of any text-based <input>
. Use .input-group
with an .input-group-addon
or .input-group-btn
to prepend or append elements to a single .form-control
.