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
"HuntGroups"
Bootstrap 4.1.1 Snippet by
porkyz
4.1.1
Preview
HTML
View Full Screen
Fork
Fork this
242
 
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 ----------> <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 ----------> <script src='//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js'></script> <div class='container-fluid'> <div class='row clearfix'> <div class='col-md-12 table-responsive text-center align-middle'> <table class='table table-bordered table-sm table-striped table-sortable' id='huntList'> <thead> <tr > <th style='width: 30%' class='text-center'> Hunt Group Name </th> <th style='width: 7%' class='text-center'> Extension </th> <th style='width: 15%' class='text-center'> Phone Number </th> <th style='width: 10%' class='text-center'> Ring Pattern </th> <th class='text-center'> Notes </th> <th style='width: 5%' class='text-center'> Remove </th> </tr> </thead> <tbody> <tr id='hunt0'> <tr> <td data-name='deptName'> <input type='text' name='hunt0' placeholder='Department Name' class='form-control'/> </td> <td data-name='extension'> <input type='text' name='huntExt0' placeholder='Ext.' class='form-control'/> </td> <td data-name='phone'> <input type='text' name='huntPhone0' placeholder='XXX-XXX-XXXX' class='form-control'/> </td> <td data-name='ring-pattern'> <select name='pattern0'> <option value='1'>Regular</option> <option value='2'>Simultaneous</option> <option value='3'>Rotorary</option> <option value='4'>Longest Waiting</option> </select> </td> <td data-name='note'> <textarea name='huntDesc0' placeholder='Description' rows='3' class='form-control'></textarea> </td> <td data-name='del'> <button id='huntDel0' onclick="removeHunt(this)" class='btn btn-danger glyphicon glyphicon-remove'><span aria-hidden='true'>×</span></button> </td> </tr> <tr> <td colspan='6'> <div class="panel-group"> <div class="panel panel-default"> <div class="panel-heading"> <h4 class="panel-title"> <a data-toggle="collapse" href="#huntExtensions0">Extensions</a> </h4> </div> <div id="huntExtensions0" class="panel-collapse collapse"> <div> <label class="checkbox-inline"><input type="checkbox" value="">1 Jane</label> <label class="checkbox-inline"><input type="checkbox" value="">54 Bob</label> <label class="checkbox-inline"><input type="checkbox" value="">1548 Greg</label> </div> </div> </div> </div> </td> </tr> </tr> <tr id='hunt1'></tr> </tbody> </table> <button id = 'addHunt' onclick="addHunt()" type='button' class='btn btn-primary btn-lg btn-block'>Add Hunt group</button> </div> </div> </div> <script> var extArr = [1]; var hunt = 1; function departmentNumber(button){ var name = $(button).attr("id"); return name[name.length-1] } function removeHunt(button){ var huntNum = departmentNumber(button); $('#hunt' + huntNum).remove(); } function addHunt(){ $('#hunt' + hunt).html("<tr><td data-name='deptName'><input type='text' name='hunt" + hunt + "' placeholder='Department Name' class='form-control'/></td><td data-name='extension'><input type='text' name='huntExt" + hunt + "' placeholder='Ext.' class='form-control'/></td><td data-name='phone'><input type='text' name='huntPhone" + hunt + "' placeholder='XXX-XXX-XXXX' class='form-control'/></td><td data-name='ring-pattern'><select name='pattern" + hunt + "'><option value='1'>Regular</option><option value='2'>Simultaneous</option><option value='3'>Rotorary</option><option value='4'>Longest Waiting</option></select></td><td data-name='note'><textarea name='huntDesc" + hunt + "' placeholder='Description' rows='3' class='form-control'></textarea></td><td data-name='del'><button id='huntDel" + hunt + "' onclick='removeHunt(this)' class='btn btn-danger glyphicon glyphicon-remove'><span aria-hidden='true'>×</span></button></td></tr><tr><td colspan='6'><div class='panel-group'><div class='panel panel-default'><div class='panel-heading'><h4 class='panel-title'><a data-toggle='collapse' href='#huntExtensions" + hunt + "'>Extensions</a></h4></div><div id='huntExtensions" + hunt + "' class='panel-collapse collapse'><div><label class='checkbox-inline'><input type='checkbox' value=''>1 Jane</label><label class='checkbox-inline'><input type='checkbox' value=''>54 Bob</label><label class='checkbox-inline'><input type='checkbox' value=''>1548 Greg</label></div></div></div></div></td></tr>"); $('#huntList').append('<tr id="hunt' + (hunt+1) + '"></tr>'); hunt++; } </script>
Related:
See More
Free Template
Vue Material Dashboard
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76