-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathregn.html
243 lines (199 loc) · 9.13 KB
/
regn.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
<html>
<head>
<title>Samarth - Empowering the Youth</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Work+Sans:100,200,300,400,700,800" rel="stylesheet">
<!--New loader Css-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css" />
<link rel="stylesheet" href="css/open-iconic-bootstrap.min.css">
<link rel="stylesheet" href="css/animate.css">
<link rel="stylesheet" href="css/owl.carousel.min.css">
<link rel="stylesheet" href="css/owl.theme.default.min.css">
<link rel="stylesheet" href="css/magnific-popup.css">
<link rel="stylesheet" href="https://codepen.io/gymratpacks/pen/VKzBEp#0">
<link href='https://fonts.googleapis.com/css?family=Nunito:400,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/aos.css">
<link rel="stylesheet" href="css/ionicons.min.css">
<link rel="stylesheet" href="css/bootstrap-datepicker.css">
<link rel="stylesheet" href="css/jquery.timepicker.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"
integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="icon" type="image/x-icon" href="images/SamarthWhite.png">
<link rel="stylesheet" href="css/flaticon.css">
<link rel="stylesheet" href="css/icomoon.css">
<link rel="stylesheet" type="text/css" href="css/regn.css">
<link rel="stylesheet" href="/css/footer.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet" />
<!-- Google Fonts -->
<script>
window.console = window.console || function (t) { };
</script>
<script>
if (document.location.search.match(/type=embed/gi)) {
window.parent.postMessage("resize", "*");
}
</script>
<!--New loader Css-->
</head>
<body>
<div class="row">
<div class="col-md-12">
<form
action=""
method="post" name="myForm">
<div class="samarth_logo">
<img src="images/SamarthBlack.png" alt="logo" width="100">
<div class="navbar-brand" style="cursor: pointer;">Samarth</div>
</div>
<h1>Registration</h1>
<fieldset>
<legend><span class="number">1</span> Your Basic Info</legend>
<label for="name">Name:</label>
<input type="text" id="name" name="Name" required>
<label for="email">Email:</label>
<input type="email" id="mail" name="Email" required>
<label for="tel">Phone Number:</label>
<input type="number" id="tel" name="PhoneNo" required>
<label for="tel">WhatsApp Number:</label>
<input type="number" id="tel" name="WhatsAppNo" required>
<label for="department">Department:</label>
<input type="text" id="department" name="dept" required>
<label for="roll">Roll Number:</label>
<input type="number" id="roll" name="roll">
<!-- <label for="img">DLSR Model Name(For DSLR Users only):</label>
<input type="text" id="dslr" name="dslr"> -->
<!-- <label for="img">Image URL(Drive View only link):</label>
<input type="url" id="img" name="image" required> -->
<label>Year:</label>
<input type="radio" id="year1" value="year1" name="year"><label for="year1" class="light">First
Year</label><br>
<input type="radio" id="year2" value="year2" name="year"><label for="year2" class="light">Second
Year</label><br>
<input type="radio" id="year3" value="year3" name="year"><label for="year3" class="light">Third
Year</label><br>
<input type="radio" id="year4" value="year4" name="year"><label for="year4" class="light">Fourth
Year</label><br>
</fieldset>
<fieldset>
<legend><span class="number">2</span> Registration Details</legend>
<label for="event">Event:</label>
<select id="event" name="event">
<!-- <optgroup label="Photography">
<option value="photography">Photography Selection</option>
</optgroup> -->
<optgroup label="Clash of Creativity">
<option value="web1.o">Webathon 1.O</option>
<option value="poster design">Poster Design</option>
<option value="video edit">Video Editing</option>
</optgroup>
<optgroup label="Safalya">
<option value="matrix">Matrix of Mock</option>
<option value="war">War of Convictions</option>
<option value="treasure">Treasure Hunt</option>
<option value="know">Know Your Hold</option>
<option value="dream">Dream Dots</option>
</optgroup>
<optgroup label="Showcase Your Talent">
<option value="content">Content Writing</option>
<option value="logo">Logo Designing</option>
<option value="meme">Meme Making</option>
</optgroup>
<optgroup label="Flagship Event">
<option value="tos">Titans of Situation</option>
</optgroup>
</select>
<!--
<label>Interests:</label>
<input type="checkbox" id="development" value="interest_development" name="user_interest"><label class="light" for="development">Development</label><br>
<input type="checkbox" id="design" value="interest_design" name="user_interest"><label class="light" for="design">Design</label><br>
<input type="checkbox" id="business" value="interest_business" name="user_interest"><label class="light" for="business">Business</label> -->
</fieldset>
<!-- <button type="submit">Register</button> -->
<button class="button" type="submit">
<span class="submit">Submit</span>
<span class="loading"><i class="fa fa-refresh"></i></span>
<span class="check"><i class="fa fa-check"></i></span>
</button>
</form>
</div>
</div>
<script>
const scriptURL = 'https://script.google.com/macros/s/AKfycbyfLzDQxfzwqRs6HXySa4xPKeyDP11U3Gwl6v6V6WMJXvfZEERvV-PcCPpYkaEZbdXT/exec'
const form = document.forms['myForm']
// let file = document.querySelector("#img");
// // let imge = document.querySelector("imge");
// file.addEventListener('change',()=>{
// let fr = new FileReader();
// fr.addEventListener('loadend',()=>{
// let res = fr.result;
// // imge.src=res;
// let spt = res.split("base64,")[1];
// // console.log(spt);
// let obj = {
// base64:spt,
// type:file.files[0].type,
// name:file.files[0].name
// }
// fetch(scriptURL,{
// method:"POST",
// body:JSON.stringify(obj)
// })
// .then(r=>r.text())
// .then(data=>console.log(data))
// })
// fr.readAsDataURL(file.files[0])
// })
form.addEventListener('submit', e => {
e.preventDefault()
fetch(scriptURL, { method: 'POST', body: new FormData(form)})
.then(response => alert("Thank you!! Your Registration is Successfully." ))
.then(() => { window.location.reload(); })
.catch(error => console.error('Error!', error.message))
})
</script>
<script>
// const button = document.querySelector('.button');
// const submit = document.querySelector('.submit');
// const name = document.getElementById("name");
// const nameValue = name.value.trim();
// const mail = document.getElementById("mail");
// const mailValue = mail.value.trim();
// const tel = document.getElementById("tel")
// const telValue =tel.value.trim()
// const roll = document.getElementById("roll")
// const rollValue =roll.value.trim()
// const department = document.getElementById("department")
// const departmentValue =department.value.trim()
// function toggleClass() {
// if(nameValue == "" || mailValue==""|| telValue==""|| rollValue==""|| departmentValue=="")
// {
// //no changes
// // this.classList.toggle('active');
// }
// else if(nameValue != "")
// {
// this.classList.toggle('active');
// }
// }
// function addClass() {
// this.classList.add('finished');
// }
// button.addEventListener('click', toggleClass);
// button.addEventListener('transitionend', toggleClass);
// button.addEventListener('transitionend', addClass);
const button = document.querySelector('.button');
const submit = document.querySelector('.submit');
function toggleClass() {
this.classList.toggle('active');
}
function addClass() {
this.classList.add('finished');
}
button.addEventListener('click', toggleClass);
button.addEventListener('transitionend', toggleClass);
button.addEventListener('transitionend', addClass);
</script>
</body>
</html>