Bootstrap Inputs

1. Introduction

Bootstrap supports all the HTML5 input controls like – input, textarea, checkbox, radio, select and input types like – text, password, datetime, datetime-local, date, month, time, week, number, email, url, search, tel, and color.

2. Bootstrap Inputs – Thumb Rules

  1. Add class .form-control to all textual <input>, <textarea>, and <select> elements
  2. To disable an input field, add a disabled attribute to the same.
  3. To specify validation states, add .has-warning, .has-error, or .has-success to the parent element.
  4. Feedback icons can be added with .has-feedback class. For proper placement of the feedback icon, the input field must be followed by a span element with appropriate classes – .glyphicon .glyphicon-warning-sign .form-control-feedback.

3. Demonstration

Receive our updates to your inbox

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.