Back to docs

Form Components

Basic Component
Form controls

We'll never share your email with anyone else.
Sizing

Range Inputs

Readonly

Readonly plain Text

Inline

Form Grid

Horizontal Form

Checkbox
Horizontal Form Label Sizing

Help Text

Your password must be 8-20 characters long, contain letters and numbers, and must not contain spaces, special characters, or emoji.
Must be 8-20 characters long.
Validation

Looks good!
Looks good!
@
Please choose a username.
Please provide a valid city.
Please provide a valid state.
Please provide a valid zip.
You must agree before submitting.
Supported Elements

Example invalid feedback text
More example invalid feedback text
Example invalid custom select feedback
Example invalid custom file feedback
Tooltips

Looks good!
Looks good!
@
Please choose a unique and valid username.
Please provide a valid city.
Please provide a valid state.
Please provide a valid zip.

Checkboxes and Radios

Checkboxes

Radios

Inline

Range

Input Group

Input Group
@
@example.com
https://example.com/users/
$
.00
With textarea
Sizing

Small
Default
Large
Checkboxes and radios

Multiple inputs

First and last name
Multiple addons

$ 0.00
$ 0.00
Button Addons

Segmented Buttons

Custom Forms

Custom Select

Custom File Input

Upload
Upload

Switches

Switches
Add class of .form-control with <input> tag
Primary Switch

Danger Switch

Success Switch

Warning Switch

Info Switch

Bootstrap Tags

Bootstrap Tags Input
Add class of .form-control with <input> tag
Markup

Just add data-role="tagsinput" to your input field to automatically change it to a tags input field.

True Multi Value

Use a <select multiple /> as your input element for a tags input, to gain true multi value support. Instead of a comma separated string, the values will be set in an array. Existing <option />elements will automatically be set as tags. This makes it also possible to create tags containing a comma.

Typeahead

Typeahead is not included in Bootstrap 3, so you'll have to include your own typeahead library. I'd recommed typeahead.js. An example of using this is shown below.

Categorizing Tags

You can set a fixed css class for your tags, or determine dynamically by providing a custom function.

Objects As Tags

Instead of just adding strings as tags, bind objects to your tags. This makes it possible to set id values in your input field's value, instead of just the tag's text.


    <!-- Tags input css -->
    <link href="assets/css/plugins/bootstrap-tagsinput.css" rel="stylesheet">
<link href="assets/css/plugins/bootstrap-tagsinput-typeahead.css" rel="stylesheet">
<!-- Tags input Js --> <script src="https://cdnjs.cloudflare.com/ajax/libs/typeahead.js/0.11.1/typeahead.bundle.min.js"></script> <script src="assets/js/plugins/bootstrap-tagsinput.min.js"></script>

Bootstrap maxlength

bootstrap Maxlength
Add class of .form-control with <input> tag
Default

The badge will show up by default when the remaining chars are 10 or less:

Threshold

Do you want the badge to show up when there are 20 chars or less? Use the threshold option:

Color-Lables

Just add color-classwith input

Play With Positions

All you need to do is specify the placement option, with one of those strings. If none is specified, the positioning will be defauted to 'top-right'.

Also Working With Textarea

Bootstrap maxlength supports textarea as well as inputs. Even on old IE.


    <!-- Bootstrap tags Js -->
    <script src="assets/js/plugins/bootstrap-maxlength.js"></script>


            

Validation

Form Validation


    <!-- Validation Js -->
    <script src="dist/assets/js/plugins/jquery.validate.min.js"></script>


            

Masking

Date
Add class of .date with data-mask attribute
Time
Add class of .hour with data-mask attribute
Phone no.
Add class of .mob_no with data-mask attribute
Network
Add class of .ip with data-mask attribute

    <!-- Input mask Js -->
    <script src="assets/js/plugins/jquery.mask.min.js"></script>


            

Wizard

Besic Wizard
Registration Done! . .

Lorem Ipsum is simply dummy text of the printing

Wizard with Button
Registration Done! . .

Lorem Ipsum is simply dummy text of the printing

Wizard with Progress
Registration Done! . .

Lorem Ipsum is simply dummy text of the printing

Wizard with Validation
Registration Done! . .

Lorem Ipsum is simply dummy text of the printing

Wizard with tabs
Registration Done! . .

Lorem Ipsum is simply dummy text of the printing

Wizard vertical
Registration Done! . .

Lorem Ipsum is simply dummy text of the printing


    <!-- Smart Wizard Js -->
    <script src="assets/js/plugins/jquery.bootstrap.wizard.min.js"></script>


            

Color picker

Color Picker
Control Types

Hue (default)
Saturation
Brightness
Wheel
Input Modes

Text Field
Hidden Input
Inline
Positions

Valid positions include bottom left, bottom right, top left, and top right.


Bottom Left (default)
Top Left
Bottom Right
Top Right
RGB(A)

RGB
RGB input can be assigned by setting the format option to rgb.
RGBA
RGBA input can be assigned by setting the formatoption to rgb and opacity option totrue.
…And More!

Opacity
Opacity can be assigned by including the data-opacityattribute or by setting the opacity option totrue.
Keywords
CSS-wide keywords can be assigned by setting the keywordsoption to a comma-separated list of valid keywords: transparent,initial, inherit.
Default Value
This field has a default value assigned to it, so it will never be empty.
Letter Case
This field will always be uppercase.
Input Groups
Example using Bootstrap's input groups.
Color
Input group example with addon.
Swatches
Example with swatches.
Swatches and Opacity
Example with swatches and opacity.

    <!-- Minicolors css -->
    <link href="assets/css/plugins/jquery.minicolors.css" rel="stylesheet">
<!-- Minicolors Js --> <script src="assets/js/plugins/jquery.minicolors.min.js"></script>

Select

Select2
Single Select

Theselect2 can take a regular select box like this...

Multi Select

The select below is declared with themultiple attribute

With Placeholder

select2 uses the placeholder attribute on multiple select boxes

Tagging Support

The select below is declared with the class.js-example-tags

Automatic Tokenization

The select below is declared with the class.js-example-tokenizer

RTL Support

The select below is declared with the class.js-example-rtl

Limiting The Number Of Selections

The select below is declared with the class.js-example-basic-multiple-limit

Diacritics Support

The select below is declared with the class.js-example-diacritics

Responsive Width

The select below is declared with the class.js-example-responsive

Loading With Array

The select below is declared with the class.js-example-data-array

Load Remote Data ( Ajax )

The select below is declared with the class.js-data-example-ajax

Disabled Results

The select below is declared with the class.js-example-disabled-results

Hiding The Search Box

The select below is declared with the class.js-example-basic-hide-search

Enable-Disable

The select below is declared with the class.js-example-disabled


    <!-- Select2 css -->
    <link href="assets/css/plugins/select2.min.css" rel="stylesheet">
<!-- Select2 Js --> <script src="assets/js/plugins/select2.full.min.js"></script>
×