-
Notifications
You must be signed in to change notification settings - Fork 0
/
Anokha - Form.html
172 lines (141 loc) · 3.83 KB
/
Anokha - 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
<html>
<head>
<script>
function amrita() {
var name =
document.forms.RegForm.Name.value;
var email =
document.forms.RegForm.EMail.value;
var phone =
document.forms.RegForm.Telephone.value;
var what =
document.forms.RegForm.Subject.value;
var password =
document.forms.RegForm.Password.value;
var address =
document.forms.RegForm.Address.value;
var regEmail=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/g; //Javascript reGex for Email Validation.
var regPhone=/^\d{10}$/; // Javascript reGex for Phone Number validation.
var regName = /\d+$/g; // Javascript reGex for Name validation
if (name == "" || regName.test(name)) {
window.alert("Please enter your name properly.");
name.focus();
return false;
}
if (address == "") {
window.alert("Please enter your address.");
address.focus();
return false;
}
if (email == "" || !regEmail.test(email)) {
window.alert("Please enter a valid e-mail address.");
email.focus();
return false;
}
if (password == "") {
alert("Please enter your password");
password.focus();
return false;
}
if(password.length <6){
alert("Password should be atleast 6 character long");
password.focus();
return false;
}
if (phone == "" || !regPhone.test(phone)) {
alert("Please enter valid phone number.");
phone.focus();
return false;
}
if (what.selectedIndex == -1) {
alert("Please enter your course.");
what.focus();
return false;
}
return true;
}
</script>
<style>
div {
box-sizing: border-box;
width: 100%;
border: 100px solid black;
float: left;
align-content: center;
align-items: center;
}
form {
margin: 0 auto;
width: 600px;
}
</style>
</head>
<body style="background-color:azure ;">
<center><h1 style="background-color: rebeccapurple;"><i style="color:aliceblue ;"> <br> Anokha 2023 - REGISTRATION FORM <br><br> </i></h1></center>
<br>
<form name="RegForm" onsubmit="return amrita()" method="post">
<p>Name: <input type="text"
size="65" name="Name" /></p>
<br />
<p>Address: <input type="text"
size="65" name="Address" />
</p>
<br />
<p>E-mail Address: <input type="text"
size="65" name="EMail" /></p>
<br />
<p>Password: <input type="text"
size="65" name="Password" /></p>
<br />
<p>Telephone: <input type="number"
size="65" name="Telephone" /></p>
<br />
<p>
SELECT YOUR COURSE
<select type="text" value="" name="Subject">
<option>BTECH</option>
<option>BBA</option>
<option>BCA</option>
<option>B.COM</option>
<option>MTECH</option>
</select>
</p>
<br />
<br />
<label for="Project">Project related to : *</label>
<br />
<input type="checkbox" name="robotics" />
<label for="Robotics">Robotics</label>
<br />
<input type="checkbox" name="Computation" />
<label for="computation">Computation</label>
<br />
<input type="checkbox" name="Aeronautics" />
<label for="Aeronautics">Aeronautics</label>
<br />
<br />
<label for="Date">Presentation Date : *</label>
<input type="date" name="Date" required />
<br><br>
<label for="Idea">Submit your idea : *</label>
<input type="file" name="idea" id="idea" required>
<br><br>
<p>Comments: <textarea cols="55"
name="Comment"> </textarea></p>
<p>
<center>
<input type="submit"
value="Submit" name="Submit" />
<input type="reset"
value="Reset" name="Reset" />
</center>
</p>
</form>
<footer style="background-color:aqua ;">
<br>
<center>© Amrita Vishwa Vidyapeetham</center>
<br>
</footer>
</body>
</html>