-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathform.html
381 lines (323 loc) · 17.4 KB
/
form.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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Registration | 2K21</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#cd2929">
<meta name="mobile-web-app-capable" content="yes"/>
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="theme-color" content="#333333">
<meta name="mobile-web-app-capable" content="yes">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js"></script>
<link rel="apple-touch-icon" href="img/plogo2k15.png">
<link rel="shortcut icon" href="img/plogo2k15.png" type="image/x-icon" />
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/styler.css">
<style>
label {
font-weight: 600;
color: #555;
}
body {
background: #cd2929;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type=number] {
-moz-appearance: textfield;
}
#loader {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
background: rgba(0,0,0,0.75) url(img/loading2.gif) no-repeat center center;
z-index: 10000;
}
a {
color: #e8f0ff;
text-decoration: none;
-webkit-transition: 0.2s opacity;
transition: 0.2s opacity;
}
a:hover, a:focus {
text-decoration: none;
outline: none;
opacity: 0.8;
color: #cd2929;
}
#footer {
position: relative;
padding-top: 60px;
padding-bottom: 60px;
background-color: #cd2929
}
.footer-logo {
text-align: center;
margin-bottom: 40px;
}
.footer-logo>a>img {
max-height: 80px;
}
.footer-follow {
text-align: center;
margin-bottom: 20px;
}
.footer-follow li {
display: inline-block;
margin-right: 10px;
margin-bottom: 13px;
}
.footer-follow li a {
display: inline-block;
width: 50px;
height: 50px;
line-height: 50px;
text-align: center;
border-radius: 3px;
background-color: #cd2929;
color:#FFF;
}
.footer-copyright p {
text-align: center;
font-size: 14px;
text-transform: uppercase;
margin: 0;
color:#fff;
}
</style>
</head>
<body>
<!-- Modal registered successfully -->
<div id="myModal" class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Welcome to Throttlez 2021</h5>
<a><button type="button" class="close" data-dismiss="modal">×</button></a>
</div>
<div class="modal-body">
<p>Congratulations ! You're successfully registered.</p>
</div>
<div class="modal-footer">
<a href="index.html"><button type="button" class="btn btn-primary" data-dismiss="modal">OK</button></a>
</div>
</div>
</div>
</div>
<!----QR model--->
<div id="qrmodal" class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">You can Pay via Any UPI App. (GPay, PhonePay, Paytm,etc..)</h5>
<a><button type="button" class="close" data-dismiss="modal">×</button></a>
</div>
<div class="modal-body">
<img src="img/qrcode.png" alt="qrcode" height="80%" width="80%">
</div>
<div class="modal-footer">
<a ><button type="button" class="btn btn-primary" data-dismiss="modal">OK</button></a>
</div>
</div>
</div>
</div>
<!--Modal ends here--->
<div class="reg-title">
<a href="index.html"><img src="img/plogo2k15.png" alt="Throttlez-logo" height=70%/></a>
<br><p style="color: white;">♦ ♦ ♦</p>
</div>
<div class="container">
<form method="post" id="regForm" name="google-sheet">
<h2 class="text-center" style="color:white" >Register Event</h2>
<br>
<div class="row jumbotron">
<div class="col-sm-6 form-group">
<label for="name">Name</label>
<input type="text" class="form-control" name="Name" id="name" placeholder="Enter your name." required>
</div>
<div class="col-sm-6 form-group">
<label for="college">College</label>
<input type="text" class="form-control" name="College" id="College" placeholder="Enter your College Name." required>
</div>
<div class="col-sm-4 form-group">
<label for="dept">Department</label>
<select name="Department" class="form-control browser-default custom-select">
<option name="Department" id="department" class="form-control" data-department="MECH" value="MECH" selected>Mechanical Engineering</option>
<option name="Department" id="department" class="form-control" data-department="AUTO" value="AUTO">Automobile Engineering</option>
<option name="Department" id="department" class="form-control" data-department="CIVIL" value="CIVIL">Civil Engineering</option>
<option name="Department" id="department" class="form-control" data-department="ECE" value="ECE">Electronics and Communication Engineering</option>
<option name="Department" id="department" class="form-control" data-department="CSE/IT" value="CSE/IT">Computer Science/IT</option>
<option name="Department" id="department" class="form-control" data-department="OTHERS" value="OTHERS">Others</option>
</select>
</div>
<div class="col-sm-2 form-group">
<label for="year">Year</label>
<select name="Year" class="form-control browser-default custom-select">
<option name="Year" id="year" class="form-control" data-year="1" value="1" selected>I YEAR</option>
<option name="Year" id="year" class="form-control" data-year="2" value="2">II YEAR</option>
<option name="Year" id="year" class="form-control" data-year="3" value="3">III YEAR</option>
<option name="Year" id="year" class="form-control" data-year="4" value="4">IV YEAR</option>
</select>
</div>
<div class="col-sm-6 form-group">
<label for="gender">Gender</label>
<select name="Gender" id="sex" class="form-control browser-default custom-select">
<option name="Gender" id="sex" class="form-control" value="male">Male</option>
<option name="Gender" id="sex" class="form-control" value="female">Female</option>
<option name="Gender" id="sex" class="form-control" value="unspesified" selected>Unspecified</option>
</select>
</div>
<div class="col-sm-6 form-group">
<label for="email">Email</label>
<input type="email" class="form-control" name="Email" id="email" placeholder="Enter your email." required>
</div>
<div class="col-sm-6 form-group">
<label for="tel">Phone</label>
<input type="number" name="Contact" class="form-control" id="tel" placeholder="Enter Your Contact Number." required>
</div>
<div class="col-sm-3 form-group">
<label for="cod">Technical</label><br>
<div><input type="checkbox" name="techEvent[]" class="tech-checkbox" id="pp" value="PaperPresentation"> <label for="pp">Paper Presentation</label></div>
<div><input type="checkbox" name="techEvent[]" class="tech-checkbox" id="aq" value="AutoQuiz"> <label for="aq">Auto Quiz</label></div>
<div><input type="checkbox" name="techEvent[]" class="tech-checkbox" id="rc" value="RCCar"> <label for="rc">RC Car</label></div>
<div><input type="checkbox" name="techEvent[]" class="tech-checkbox" id="hr" value="HydroRocketry"> <label for="hr">Pit Stop</label></div>
<div><input type="checkbox" name="techEvent[]" class="tech-checkbox" id="mc" value="MrCad"> <label for="mc">Mr. CAD</label></div>
<div><input type="checkbox" name="techEvent[]" class="tech-checkbox" id="mm" value="MrManufacturer"> <label for="mm">Mr. Manufacturer</label></div>
</div>
<div class="col-sm-3 form-group">
<label for="cod">Non-Technical</label><br>
<div><input type="checkbox" name="nontechEvent[]" class="nontech-checkbox" id="meme" value="MemeCreation"> <label for="meme">Tech Memes</label></div>
<div><input type="checkbox" name="nontechEvent[]" class="nontech-checkbox" id="mobphoto" value="MobilePhotography"> <label for="mobphoto">Mobile Photography</label></div>
<div><input type="checkbox" name="nontechEvent[]" class="nontech-checkbox" id="conn" value="Connexion"> <label for="conn">Connexion</label></div>
<br>
<label for="cod">Workshops</label><br>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline1" name="Workshop" class="custom-control-input" value="None" checked>
<label class="custom-control-label" for="customRadioInline1">None</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadioInline2" name="Workshop" class="custom-control-input" value="3D Printing">
<label class="custom-control-label" for="customRadioInline2">3D Printing (₹ 150)</label>
</div>
</div>
<input type="hidden" id="event" name="Event" value="">
<div class="col-sm-6 form-group">
<label for="rules"><p class="mb-0 font-weight-bold text-secondary text-uppercase">NOTE</p></label>
<div >
<p class="mb-4">
<ul>
<li>For group events, please register each team member separately.
(A team should have between 2 and 4 members)</li>
<li>Food and Transport Facility will be arranged.</li>
<li>Each Participant is allowed to participate upto 2 Events in each category.<br>(Technical - 2 , Non Technical - 2)</li>
<li>All the events will be conducted simultaneously so please choose wisely.</li>
<li>Certificates will be provided.</li>
<li>Decision of the judges will be final and binding.</li>
<li>On spot registration is available.</li>
</ul>
</p>
</div>
</div>
<div class="col-sm-3 form-group">
<label for="btn"></label>
<a id="paymentanchor" href="upi://pay?pn=UPAYI&pa=Pgokul253@ybl&cu=INR&am=100.0" class="btn btn-primary py-2 px-4 text-white"><span>Pay ₹100</span></a>
<a class="btn btn-primary py-2 text-white" data-toggle="modal" data-target="#qrmodal"><i class="fa fa-qrcode" aria-hidden="true"></i></a>
</div>
<div class="col-sm-4 form-group">
<input type="number" name="TransactionID" class="form-control" id="tractId" placeholder="Enter TransactionID or Ref No" >
</div>
<div class="col-sm-12">
<input type="checkbox" name="Rules" class="form-check d-inline" id="chb" required><label for="chb" class="form-check-label"> I read all rules and instructions.
</label>
</div>
<div class="col-sm-12 form-group mb-0">
<input type="submit" id="regBtn" name="submit" value="Register" class="btn btn-primary mb-2 float-right py-2 px-4 text-white" data-toggle="modal">
</div>
</div>
</form>
</div>
<div id="loader"></div>
<footer id="footer">
<div class="container">
<!-- Row -->
<div class="row">
<div class="col-md-12">
<!-- footer logo -->
<div class="footer-logo">
<a href="#"><img src="img/plogo2k15.png" alt="scanfcode"></a>
</div>
<!-- /footer logo -->
<!-- footer follow -->
<ul class="footer-follow">
<li><a href="https://instagram.com/throttlez2k21?utm_medium=copy_link"><i class="fa fa-instagram"></i></a></li>
<li><a href="mailto:throttlez2k21@gmail.com"><i class="fa fa-envelope"></i></a></li>
<li><a href="tel:+917418227505"><i class="fa fa-phone"></i></a></li>
</ul>
<!-- /footer follow -->
<!-- footer copyright -->
<div class="footer-copyright">
<p>Copyright © 2021. All Rights Reserved. <a href="https://throttlez2k21.github.io" target="_blank">Throttlez 2021</a></p>
</div>
<!-- /footer copyright -->
</div>
</div>
<!-- /Row -->
</div>
<!-- /Container -->
</footer>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"></script>
<script>
const scriptURL = 'https://script.google.com/macros/s/AKfycbzQ34mi61Ye5yr8z4qNITyy_3GenRYMoir9vLdEFFBYPlBG8whuRzRxXDW0ZoGKSZxdQA/exec'
const form = document.forms['google-sheet']
form.addEventListener('submit', e => {
e.preventDefault()
var check_box_values = $('#regForm [type="checkbox"]:checked').map(function () {
return this.value;
}).get();
document.getElementById("event").value = check_box_values;
var spinner = $('#loader');
$("#loader").show().delay(4000).fadeOut();
fetch(scriptURL, { method: 'POST', body: new FormData(form)})
.then(response => $("#myModal").modal('show'))
.catch(error => console.log("Error",error))
})
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function () {
$("input[name='techEvent[]']").change(function () {
var maxAllowed = 2;
var cnt = $("input[name='techEvent[]']:checked").length;
if (cnt > maxAllowed) {
$(this).prop("checked", "");
}
});
});
$(document).ready(function () {
$("input[name='nontechEvent[]']").change(function () {
var maxAllowed = 2;
var cnt = $("input[name='nontechEvent[]']:checked").length;
if (cnt > maxAllowed) {
$(this).prop("checked", "");
}
});
});
</script>
</body>
</html>