-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
101 lines (101 loc) · 3.94 KB
/
index.html
File metadata and controls
101 lines (101 loc) · 3.94 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="assets/styles.css">
<link rel="shortcut icon" type="image/png" href="assets/images/favicon.png" />
<title>Submission Form | DES & DEV Bootcamp | Genesys AE-FUNAI | GDSC AE-FUNAI</title>
<meta name="keywords"
content="Design, Web Development, Genesys Tech Hub, Genesys Campus Clubs, Genesys AE-FUNAI, Google Developer Student Clubs, GDSC, Google Developers, AE-FUNAI, DSC AE-FUNAI">
<meta name="description"
content="Submit your individual project during the Des & Dev Bootcamp. The Des & Dev Bootcamp was a six weeks intensive learning program in AE-FUNAI where learners learnt either UI/UX Design or Web Development, and was organised by Genesys and GDSC both in AE-FUNAI">
</head>
<body>
<main>
<img src="assets/images/logos.png" alt="logo" class="logos">
<h1>Submission Form</h1>
<form method="POST" id="task">
<div id="left-desktop">
<label class="standalone standalone-text">
<input type="text" class="blue" name="name" placeholder="Full Name" required minlength="3">
<span>Full Name</span>
</label>
<label class="standalone standalone-text">
<input type="email" class="blue" name="email" placeholder="Email Address" required minlength="3">
<span>Email Address</span>
</label>
<label class="standalone standalone-text">
<input type="tel" class="blue" name="phone" placeholder="Phone Number" required pattern="^\+234[789][01]\d{8}$">
<span>
<span>Phone Number</span>
<small>Whatsapp Phone Number, Please start with +234...</small>
</span>
</label>
<label class="standalone standalone-text">
<input type="url" class="blue" name="link" placeholder="Submission Link" required>
<span>Submission Link</span>
</label>
</div>
<div id="right-desktop">
<fieldset>
<legend>Week</legend>
<label>
<input type="radio" name="week" value="0" required>
Intro
</label>
<label>
<input type="radio" name="week" value="1">
Week 1
</label>
<label>
<input type="radio" name="week" value="2" checked>
Week 2
</label>
<label>
<input type="radio" name="week" value="10" checked>
Medium Article
</label>
<label>
<input type="radio" name="week" value="3">
Week 3
</label>
<label>
<input type="radio" name="week" value="4">
Week 4
</label>
</fieldset>
<fieldset>
<legend>Track</legend>
<label>
<input type="radio" name="track" value="ui" required>
UI/UX Design
</label>
<label>
<input type="radio" name="track" value="web">
Web Development
</label>
</fieldset>
<button type="submit">Submit</button>
</div>
</form>
</main>
<script type="text/javascript">
// post form details to google sheets
const scriptURL = 'https://script.google.com/macros/s/AKfycbzOyn8mdeC6u-3UQJ16wGwGrECATythH4qgaNipDsgXVRBdekxxFXjDn7EmFv5Ty1Oo/exec';
const form = document.querySelector('#task');
form.addEventListener('submit', e => {
e.preventDefault();
document.querySelector('button').disabled = true;
const link = Object.fromEntries(new FormData(form)).link;
fetch(scriptURL, { method: 'POST', body: new FormData(form)})
.then(response => location.assign(`thankyou.html?link=${link}`))
.catch(error => {
document.querySelector('button').disabled = false;
console.error('Error!', error.message);
alert(error.message);
});
});
</script>
</body>
</html>