-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapplication-form.html
More file actions
172 lines (135 loc) · 5.22 KB
/
Copy pathapplication-form.html
File metadata and controls
172 lines (135 loc) · 5.22 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Application Form</title>
<link rel="stylesheet" href="css/application-css.css">
<link rel="text/javascript" href="js/form.js">
</head>
<body>
<form name="Form">
<h2>Application Form</h2>
<div class="box">
<label>Application Id</label>
<input type="text" name="application_id" required>
</div>
<div class="box">
<label>Full Name</label>
<input type="text" name="name" required>
</div>
<div class="box">
<label>Email</label>
<input type="text" name="email">
<div id="emailErr"></div>
</div>
<div class="box">
<label>Date of Birth</label>
<input type="date" name="DoB" required>
</div>
<!-- 'application_id','name','DoB','Aadhar','Passport','Address','gender','pwd_category',
'documents','passport_pic','Notes -->
<div class="box">
<label>Aadhar Number</label>
<input type="number" name="Aadhar" required>
</div>
<div class="box">
<label>Passport</label>
<input type="number" name="Passport" required>
</div>
<div class="box">
<label>Address</label>
<input type="text" name="Address" required>
</div>
<div class="box">
<label>Gender</label>
<div class="form-inline" id="gender">
<label><input type="radio" name="gender" value="male" required> Male</label>
<label><input type="radio" name="gender" value="female" required> Female</label>
</div>
<div class="error" id="genderErr"></div>
</div>
<!-- 'application_id','name','DoB','Aadhar','Passport','Address','gender','pwd_category',
'documents','passport_pic','Notes -->
<div class="box">
<label for="department">Department
</label>
<select id="department" name="department" required>
<option value="none" selected disabled hidden>Select your Department</option>
<option value="Computer Science">Computer Science</option>
<option value="Electronics Engineering">Electronics Engineering</option>
<option value="Chemical Engineering">Chemical Engineering</option>
</select>
</div>
<div class="box">
<label for="specialization">Specialization
</label>
<select name="specialization" id="specialization" required>
</select>
</div>
<div class="box">
<label for="reservation_category">Category
</label>
<select id="reservation_category" name="reservation_category">
<option value="OC">OC</option>
<option value="OBC">OBC</option>
<option value="SC">SC</option>
<option value="ST">ST</option>
</select>
</div>
<div class="box">
<label>PWD Category</label>
<input type="text" name="pwd_category" id="name" required>
</div>
<div class="box">
<label>Documents</label>
<input type="file" accept="application/pdf" name="documents" id="name" required>
</div>
<div class="box">
<label>Passport Pic</label>
<input type="file" accept="image/png, image/jpeg, image/jpg" name="passport_pic" id="name" required>
</div>
<div class="box">
<label>Notes</label>
<input type="text" name="Notes" id="name" required>
</div>
<div class="box">
<input type="submit" value="Submit" id="submit-btn">
</div>
<!-- Below link is only for checking purposes, hence can be removed -->
<!-- <div><a href="login-page.html">LOGIN</a></div> -->
</form>
<div>
{% if messages %}
<ul class="messages">
{% for msg in messages %}
<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> {{msg.message}}
</div>
{% endfor %}
</ul>
{% endif %}
</div>
<script type="text/javascript">
setTimeout(function() {
$('messages').fadeOut('fast');
}, 10000);
function getSpecializations() {
var x = document.getElementById("department").value;
var items;
if (x === "Computer Science") {
items = ["Machine Learning", "Web development"];
} else if (x === "Electronics Engineering") {
items = ["Robotics", "Chip Designing"]
} else {
items = ["Power Plant", "Petroleum Industry"]
}
var str = ""
for (var item of items) {
str += "<option value='" + item + "'>" + item + "</option>"
}
document.getElementById("specialization").innerHTML = str;
}
document.getElementById("department").addEventListener("click", getSpecializations)
</script>
</body>
</html>