-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathform.html
83 lines (81 loc) · 2.72 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<!-- Links the external CSS file for styling -->
<link rel="stylesheet" href="styles.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Sets the title of the web page, which appears in the browser tab -->
<title>Signup Form</title>
</head>
<body>
<!-- Initialize a JavaScript variable to track form submission status -->
<script type="text/javascript">
var submitted = false;
</script>
<!-- Hides iframe used to handle form submission without reloading the page -->
<!-- && redirects to 'submitted.html' when form is successfully submitted -->
<iframe
name="hiddenConfirm"
id="hiddenConfirm"
style="display: none"
onload="if(submitted){window.location='./submitted.html'}"
></iframe>
<!-- Make sure that the'name' attribute always corresponds to the Google Form field -->
<form
action="https://docs.google.com/forms/d/e/1FAIpQLSdabKxN-FOcCQ6ts2UlRhBZevImBigv4P0XcnEsGUyqquxAFw/formResponse"
method="POST"
target="hiddenConfirm"
onsubmit="submitted=true; return true;"
class="container"
>
<h1>Signup Form</h1>
<div class="label_input">
<label for="fname">First Name:</label>
<input type="text" id="fname" name="entry.20089888" required />
</div>
<div class="label_input">
<label for="lname">Last Name:</label>
<input type="text" id="lname" name="entry.1785267775" required />
</div>
<div class="label_input">
<label for="email">Email:</label>
<input type="email" id="email" name="entry.913077170" required />
</div>
<div class="label_input">
<label for="phone">Phone Number:</label>
<input type="tel" id="phone" name="entry.891389050" required />
</div>
<div class="label_input">
<label for="age">Age</label>
<select id="age" name="entry.1053084225">
<option value="10-18">10-18</option>
<option value="18-25">18-25</option>
<option value="26-35">26-35</option>
</select>
</div>
<div class="label_input">
<label>Gender</label>
<div>
<label for="male">Male</label>
<input
type="radio"
id="male"
name="entry.972700002"
value="male"
required
/>
<label for="female">Female</label>
<input
type="radio"
id="female"
name="entry.972700002"
value="female"
required
/>
</div>
</div>
<button type="submit">Send Enquiry</button>
</form>
</body>
</html>