-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSampleForm002.html
296 lines (234 loc) · 9.07 KB
/
SampleForm002.html
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<html>
<head>
<meta charset="utf-8">
<title>Sample Form 002</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
.M-form .alert.alert-danger {
display:none;
}
.M-form .M-invalid .alert.alert-danger {
display: initial;
}
</style>
</head>
<body id="mainApp">
<script src="https://cdn.rawgit.com/jquery/jquery/2.1.4/dist/jquery.min.js"></script>
<script src="https://cdn.rawgit.com/lodash/lodash/4.17.4/dist/lodash.js"></script>
<script src="https://cdn.rawgit.com/keeganstreet/specificity/2ab18ea1/specificity.js"></script>
<script src="Morbid.js"></script>
<script>
function required(){
var v = this.find('input').val();
console.log('val is ',v );
return v!=='';
}
function update(){
console.log('update');
this.toggleClass('M-invalid', !this.validate());
}
M.rein(document.body);
M.bulk({
'.M-form .form-group' : {
'validate': required, //they are all required by default
'click keyup': update
},
'.M-form ,'
});
</script>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Morbid test app</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<form class="navbar-form navbar-right">
<div class="form-group">
<input type="text" placeholder="Email" class="form-control">
</div>
<div class="form-group">
<input type="password" placeholder="Password" class="form-control">
</div>
<button type="submit" class="btn btn-success">Sign in</button>
</form>
</div><!--/.navbar-collapse -->
</div>
</nav>
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<div class="container">
<h1>Morbid test form.</h1>
<p>Here is a test form you can open to play with. It is writen on Morbid. See page code. </p>
<!--<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more »</a></p>-->
</div>
</div>
<form class="form-horizontal M-form">
<fieldset>
<!-- Form Name -->
<legend>Form Name</legend>
<!-- Text input-->
<div class="form-group M-name">
<label class="col-md-4 control-label" for="fn">First name</label>
<div class="alert alert-danger" role="alert">
<strong>Oh snap!</strong> Change a few things up and try submitting again.
</div>
<div class="col-md-4">
<input id="fn" name="fn" type="text" placeholder="first name" class="form-control input-md" required="">
</div>
</div>
<!-- Text input-->
<div class="form-group M-lastname">
<label class="col-md-4 control-label" for="ln">Last name</label>
<div class="alert alert-danger" role="alert">
<strong>Oh snap!</strong> Change a few things up and try submitting again.
</div>
<div class="col-md-4">
<input id="ln" name="ln" type="text" placeholder="last name" class="form-control input-md" required="">
</div>
</div>
<!-- Text input-->
<div class="form-group M-company">
<label class="col-md-4 control-label" for="cmpny">Company</label>
<div class="alert alert-danger" role="alert">
<strong>Oh snap!</strong> Change a few things up and try submitting again.
</div>
<div class="col-md-4">
<input id="cmpny" name="cmpny" type="text" placeholder="company" class="form-control input-md" required="">
</div>
</div>
<!-- Text input-->
<div class="form-group M-email">
<label class="col-md-4 control-label" for="email">Email</label>
<div class="alert alert-danger" role="alert">
<strong>Oh snap!</strong> Change a few things up and try submitting again.
</div>
<div class="col-md-4">
<input id="email" name="email" type="text" placeholder="email" class="form-control input-md" required="">
</div>
</div>
<!-- Text input-->
<div class="form-group M-address-1">
<label class="col-md-4 control-label" for="add1">Address 1</label>
<div class="col-md-4">
<input id="add1" name="add1" type="text" placeholder="" class="form-control input-md" required="">
</div>
</div>
<!-- Text input-->
<div class="form-group M-adress-2">
<label class="col-md-4 control-label" for="add2">Address 2</label>
<div class="col-md-4">
<input id="add2" name="add2" type="text" placeholder="" class="form-control input-md">
</div>
</div>
<!-- Text input-->
<div class="form-group M-city">
<label class="col-md-4 control-label" for="city">City</label>
<div class="col-md-4">
<input id="city" name="city" type="text" placeholder="city" class="form-control input-md" required="">
</div>
</div>
<!-- Text input-->
<div class="form-group M-zip">
<label class="col-md-4 control-label" for="zip">Zip Code</label>
<div class="col-md-4">
<input id="zip" name="zip" type="text" placeholder="Zip Code" class="form-control input-md" required="">
</div>
</div>
<!-- Text input-->
<div class="form-group M-country">
<label class="col-md-4 control-label" for="ctry">Country</label>
<div class="col-md-4">
<input id="ctry" name="ctry" type="text" placeholder="Country" class="form-control input-md" required="">
</div>
</div>
<!-- Text input-->
<div class="form-group M-phone">
<label class="col-md-4 control-label" for="phone">Text InputPhone</label>
<div class="col-md-4">
<input id="phone" name="phone" type="text" placeholder="Phone#" class="form-control input-md" required="">
</div>
</div>
<!-- Multiple Radios (inline) -->
<div class="form-group M-networking">
<label class="col-md-4 control-label" for="Training">Would you like to attend our Networking Reception on September 3, 2015?</label>
<div class="col-md-4">
<label class="radio-inline" for="Training-0">
<input type="radio" name="Training" id="Training-0" value="yes" checked="checked">
Yes
</label>
<label class="radio-inline" for="Training-1">
<input type="radio" name="Training" id="Training-1" value="no">
No
</label>
</div>
</div>
<!-- Multiple Radios (inline) -->
<div class="form-group M-update-session">
<label class="col-md-4 control-label" for="Networking_Reception">Would you like to attend our Technical Product Update Session on September 4, 2015?</label>
<div class="col-md-4">
<label class="radio-inline" for="Networking_Reception-0">
<input type="radio" name="Networking_Reception" id="Networking_Reception-0" value="meet_yes" checked="checked">
Yes
</label>
<label class="radio-inline" for="Networking_Reception-1">
<input type="radio" name="Networking_Reception" id="Networking_Reception-1" value="meet_no">
No
</label>
</div>
</div>
<!-- Select Basic -->
<div class="form-group M-select-basic">
<label class="col-md-4 control-label" for="selectbasic">Select Basic</label>
<div class="col-md-4">
<select id="selectbasic" name="selectbasic" class="form-control input-md">
<option>Option one</option>
<option>Option two</option>
</select>
</div>
</div>
<!-- Multiple Radios (inline) -->
<div class="form-group M-multiple-radio">
<label class="col-md-4 control-label" for="Dinner">Would you like to attend our Networking Dinner on September 4, 2015?</label>
<div class="col-md-4">
<label class="radio-inline" for="Dinner-0">
<input type="radio" name="Dinner" id="Dinner-0" value="dinner_yes" checked="checked">
Yes
</label>
<label class="radio-inline" for="Dinner-1">
<input type="radio" name="Dinner" id="Dinner-1" value="dinner_no">
No
</label>
</div>
</div>
<!-- Button -->
<div class="form-group M-submit-group">
<label class="col-md-4 control-label" for="submit"></label>
<div class="col-md-4">
<button id="submit" name="submit" class="btn btn-primary">SUBMIT</button>
</div>
</div>
</fieldset>
</form>
<hr>
<footer>
<p>© 2017 Morbid team.</p>
</footer>
</div> <!-- /container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script>
<script src="../../dist/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</body>
</html>