Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Form Registration"
Bootstrap 3.2.0 Snippet by
junrillg
3.2.0
registration
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
7.7K
 
0 Fav
Post to Facebook
Tweet this
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <div class="form-box"> <h1>Form <span>Registration</span></h1> <form role="form" id="contact-form"> <!-- name field --> <div class="form-group"> <div id="nameError" class="alert" role="alert"></div> <label for="form-name-field" class="sr-only">Name</label> <div class="input-group"> <div class="input-group-addon"><span class="glyphicon glyphicon-user"></span></div> <input type="text" class="form-control" id="form-name-field" value="" placeholder="Name"> </div> </div> <!-- email field --> <div class="form-group"> <div id="emailError" class="alert" role="alert"></div> <label for="form-email-field" class="sr-only">Email</label> <div class="input-group"> <div class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></div> <input type="email" class="form-control" id="form-email-field" value="" placeholder="Email"> </div> </div> <!-- phone field --> <div class="form-group"> <div id="phoneError" class="alert" role="alert"></div> <label for="form-phone-field" class="sr-only">Phone</label> <div class="input-group"> <div class="input-group-addon"><span class="glyphicon glyphicon-phone"></span></div> <input type="phone" class="form-control" id="form-phone-field" value="" placeholder="Phone"> </div> </div> <div class="checkbox"> <label> <input type="checkbox"> I agree to terms and condition. </label> </div> <button type="submit" class="btn btn-default">Submit</button> </form> </div> </div> </div>
body { background-color: lightblue; } .form-box { width: 50%; margin: auto; padding-top:20px; } .form-box h1 { text-align: center; font-weight: bold; text-transform: uppercase; color: tomato; } .form-box h1 span { font-weight: lighter; }
document.getElementById("contact-form").onsubmit = function() { var nameValidate = /[a-z]/; //Validate Name if(document.getElementById("form-name-field").value == "") { document.getElementById("nameError").innerHTML = "Please Enter A Name"; document.getElementById("nameError").className = "alert-danger"; } }
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76