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
"PlainUser"
Bootstrap 3.3.0 Snippet by
kbhokray
3.3.0
user
Preview
HTML
JS
View Full Screen
Fork
Fork this
1.5K
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.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 ----------> <form id="form"> <div class="form-group"> <label class="col-form-label" for="Name">Name</label> <input type="text" class="form-control" id="Name" placeholder="Name"> </div> <div class="form-group"> <label class="col-form-label" for="DisplayName">Display Name</label> <input type="text" class="form-control" id="DisplayName" placeholder="Display Name"> </div> <div class="form-group"> <label class="mr-sm-2" for="position">Position</label> <select class="form-control mb-2 mr-sm-2 mb-sm-0" id="position"> <option selected>Choose...</option> <option value="1">Product Head</option> <option value="2">General Manager</option> <option value="3">Product Manager</option> <option value="4">Team Lead</option> </select> </div> <div class="form-group"> <label class="col-form-label" for="Password">Password</label> <input type="password" class="form-control" id="Password" placeholder="Password"> </div> <button type="submit" class="btn btn-primary">Register</button> </form>
$("form").submit(function(e) { e.preventDefault(); let account = {}; $.each($("form").serializeArray(), function(i, field) { account[field.name] = field.value; }); console.log(JSON.stringify(account)); });
Related:
See More
Free Template
Hipster As F*** Cards
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76