"Modal Popup with Form"
Bootstrap 3.2.0 Snippet by tbednarick

<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 ----------> <table> <tr> <td valign="top"> <span id="ctl00_Content_ShowSession_lblRegisterCWFTypeText">Click here to process your registration</span> </td> <td align="right" valign="top"> <button class="btn btn-primary btn-block" type="button" data-target="#exampleModal" data-toggle="modal">Register Myself</button><br> </td> </tr> <tr> <td valign="top"> <span id="ctl00_Content_ShowSession_lblRegisterCWFTypeText">You are not registered</span> </td> <td> <button class="btn btn-info pull-right btn-block" type="button" data-target="#exampleModal" data-toggle="modal">Register Someone Else</button> <div tabindex="-1" class="modal fade" id="exampleModal" role="dialog" aria-hidden="true" aria-labelledby="exampleModalLabel" style="display: none;"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <div class="modal-header"> <h2 class="modal-title" id="exampleModalLabel"> Register Someone Else </h2><button class="close" aria-label="Close" type="button" data-dismiss="modal"><span aria-hidden="true">×</span></button> </div> <div class="modal-body"> <div class="container-fluid"> <div class="row"> <div class="col-sm-4"> <div action="" data-toggle="validator"> <div class="form-inline"> <div class="form-group"> <label class="input-group"> <span class="input-group-addon"> <input type="radio" name="test" value="Existing" /> </span> <div class="form-control form-control-static"> Existing Registrant </div> <span class="glyphicon form-control-feedback "></span> </label> </div> </div> </div> </div> <div class="col-sm-4"> <div action="" data-toggle="validator"> <div class="form-inline"> <div class="form-group"> <label class="input-group"> <span class="input-group-addon"> <input type="radio" name="test" value="New" /> </span> <div class="form-control form-control-static"> New Registrant </div> <span class="glyphicon form-control-feedback "></span> </label> </div> </div> </div> </div> </div> <div class="row"> <div class="col-sm-4"> <ul id="mylist" class="nav nav-stacked nav-block" style="overflow:scroll;overflow-x:hidden;height:200px;"> <li class="active"><a class="active" href="#">Doe, Jane</a></li> <li><a href="#">Jackson, Jordan</a></li> <li><a href="#">O'Mally, Jessica</a></li> <li><a href="#">Public, John Q.</a></li> <li class="disabled"><a href="#">Westlake, Janine</a></li> <li><a href="#">White, Jack</a></li> <li><a href="#">White, Meg</a></li> </ul> </div> <div class="col-sm-6"> <div class="input-group"> <input type="text" class="form-control" placeholder="Email" aria-label="Search for..."> <span class="input-group-btn"> <button class="btn btn-secondary" type="button">Invite</button> </span> </div> </div> </div> </div> </div> <div class="modal-footer"> <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button> <button class="btn btn-primary" type="button">Continue</button> </div> </div> </div> </div> </td> </tr> </table>
ul#mylist { top: 5px; bottom: 5px; left: 15px; right: 5px; overflow: scroll; margin: 0; padding: 0; border: 2px solid #ccc; font-size: 14px; font-family: Arial, sans-serif; // Again, this is where the magic happens -webkit-overflow-scrolling: touch; } td { padding-left:5px; }
$('#myModal').on('shown.bs.modal', function () { $('#myInput').trigger('focus') })

Related: See More


Questions / Comments: