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
"Untitled"
Bootstrap 4.1.1 Snippet by
adarwash2012
4.1.1
jQuery
Preview
HTML
JS
View Full Screen
Fork
Fork this
542
 
0 Fav
Post to Facebook
Tweet this
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <form class="form-horizontal"> <fieldset> <!-- Form Name --> <legend>Form Name</legend> <!-- Text input--> <div class="form-group"> <label class="col-md-4 control-label" for="textinput">Text Input</label> <div class="col-md-4"> <input id="textinput" name="textinput" type="text" placeholder="placeholder" class="form-control input-md"> <span class="help-block">help</span> </div> </div> <!-- Multiple Checkboxes --> <div class="form-group"> <label class="col-md-4 control-label" for="checkboxes">Multiple Checkboxes</label> <div class="col-md-4"> <div class="checkbox"> <label for="checkboxes-0"> <input type="checkbox" name="checkboxes" id="checkboxes-0" value="1"> Option one </label> </div> <div class="checkbox"> <label for="checkboxes-1"> <input type="checkbox" name="checkboxes" id="checkboxes-1" value="2"> Option two </label> </div> </div> </div> <!-- Text input--> <div class="form-group"> <label class="col-md-4 control-label" for="textinput">Text Input</label> <div class="col-md-4"> <input id="textinput" name="textinput" type="text" placeholder="placeholder" class="form-control input-md"> <span class="help-block">help</span> </div> </div> <!-- Multiple Checkboxes (inline) --> <div class="form-group"> <label class="col-md-4 control-label" for="checkboxes">Inline Checkboxes</label> <div class="col-md-4"> <label class="checkbox-inline" for="checkboxes-0"> <input type="checkbox" name="checkboxes" id="checkboxes-0" value="1"> 1 </label> <label class="checkbox-inline" for="checkboxes-1"> <input type="checkbox" name="checkboxes" id="checkboxes-1" value="2"> 2 </label> <label class="checkbox-inline" for="checkboxes-2"> <input type="checkbox" name="checkboxes" id="checkboxes-2" value="3"> 3 </label> <label class="checkbox-inline" for="checkboxes-3"> <input type="checkbox" name="checkboxes" id="checkboxes-3" value="4"> 4 </label> </div> </div> <!-- Text input--> <div class="form-group"> <label class="col-md-4 control-label" for="textinput">Text Input</label> <div class="col-md-4"> <input id="textinput" name="textinput" type="text" placeholder="placeholder" class="form-control input-md"> <span class="help-block">help</span> </div> </div> <!-- Multiple Checkboxes --> <div class="form-group"> <label class="col-md-4 control-label" for="checkboxes">Multiple Checkboxes</label> <div class="col-md-4"> <div class="checkbox"> <label for="checkboxes-0"> <input type="checkbox" name="checkboxes" id="checkboxes-0" value="1"> Option one </label> </div> <div class="checkbox"> <label for="checkboxes-1"> <input type="checkbox" name="checkboxes" id="checkboxes-1" value="2"> Option two </label> </div> </div> </div> <!-- Multiple Checkboxes (inline) --> <div class="form-group"> <label class="col-md-4 control-label" for="checkboxes">Inline Checkboxes</label> <div class="col-md-4"> <label class="checkbox-inline" for="checkboxes-0"> <input type="checkbox" name="checkboxes" id="checkboxes-0" value="1"> 1 </label> <label class="checkbox-inline" for="checkboxes-1"> <input type="checkbox" name="checkboxes" id="checkboxes-1" value="2"> 2 </label> <label class="checkbox-inline" for="checkboxes-2"> <input type="checkbox" name="checkboxes" id="checkboxes-2" value="3"> 3 </label> <label class="checkbox-inline" for="checkboxes-3"> <input type="checkbox" name="checkboxes" id="checkboxes-3" value="4"> 4 </label> </div> </div> <!-- Text input--> <div class="form-group"> <label class="col-md-4 control-label" for="textinput">Text Input</label> <div class="col-md-4"> <input id="textinput" name="textinput" type="text" placeholder="placeholder" class="form-control input-md"> <span class="help-block">help</span> </div> </div> <!-- Text input--> <div class="form-group"> <label class="col-md-4 control-label" for="textinput">Text Input</label> <div class="col-md-4"> <input id="textinput" name="textinput" type="text" placeholder="placeholder" class="form-control input-md"> <span class="help-block">help</span> </div> </div> <textarea></textarea> </fieldset> </form> <button>save</button> </div>
$(function(){ $('button').on('click',function(){ $('input[type="text"]').each(function(i,e){ $current_value = $(this).val(); $(this).attr("value",$current_value) }) $('textarea').each(function(i,e){ $current_value = $(this).val(); $(this).text($current_value) }) }); $('input:checkbox').change( function(){ if ($(this).is(':checked')) { $(this).attr('checked','checked') } else { $(this).removeAttr( "checked" ) } }); })
Related:
See More
Free Template
Vue Now UI Kit
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76