"Modal Popup with Form"
Bootstrap 3.2.0 Snippet by tbednarick

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<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">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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; }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
$('#myModal').on('shown.bs.modal', function () {
$('#myInput').trigger('focus')
})
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: