Forms with Feedback Icons - HTML CSS Bootstrap

HTML CSS examples for Bootstrap:Form Control

Description

Forms with Feedback Icons

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
 <head> 
  <meta charset="utf-8"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <title>Example of Bootstrap 3 Forms with Feedback Icons</title> 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

 </head> <!--from  w  w w .  j a  va 2 s . c  om-->
 <body> 
  <div> 
   <form class="form-horizontal"> 
    <div class="form-group has-success has-feedback"> 
     <label class="col-xs-2 control-label" for="inputSuccess">Username</label> 
     <div class="col-xs-10"> 
      <input type="text" id="inputSuccess" class="form-control" placeholder="Input with success"> 
      <span class="glyphicon glyphicon-ok form-control-feedback"></span> 
      <span class="help-block">Username is available</span> 
     </div> 
    </div> 
    <div class="form-group has-warning has-feedback"> 
     <label class="col-xs-2 control-label" for="inputWarning">Password</label> 
     <div class="col-xs-10"> 
      <input type="password" id="inputWarning" class="form-control" placeholder="Input with warning"> 
      <span class="glyphicon glyphicon-warning-sign form-control-feedback"></span> 
      <span class="help-block">Password strength: Weak</span> 
     </div> 
    </div> 
    <div class="form-group has-error has-feedback"> 
     <label class="col-xs-2 control-label" for="inputError">Email</label> 
     <div class="col-xs-10"> 
      <input type="email" id="inputError" class="form-control" placeholder="Input with error"> 
      <span class="glyphicon glyphicon-remove form-control-feedback"></span> 
      <span class="help-block">Please enter a valid email address</span> 
     </div> 
    </div> 
   </form> 
  </div>   
 </body>
</html>

Related Tutorials