-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwaitlist.html
More file actions
94 lines (77 loc) · 3.75 KB
/
waitlist.html
File metadata and controls
94 lines (77 loc) · 3.75 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Waitlist Form</title>
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="images/Questify Logo Icon Black Gradient.svg" type="image/x-icon">
</head>
<body>
<div class="waitlist-contain">
<div class="left-form">
<div class="stars-float">
<img src="images/stars waitlist float.svg">
</div>
<img src="images/left waitlist.svg" alt="">
</div>
<div class="right-form">
<div class="row">
<div class="form-topper">
<img src="images/questify logo full.png" alt="">
<div class="waitlist-horizontal-seperator"></div>
</div>
<a href="index.html"><img src="images/close icon.png" alt=""></a>
</div>
<form name="submit-to-google-sheet">
<div class="user-details">
<h2>join the waitlist</h2>
<div class="input-box">
<span class="details">your email</span>
<input type="text" name="Email" placeholder="enter your email" required>
</div>
<div class="row-waitlist">
<div class="input-box">
<span class="details">first name</span>
<input type="text" name="First Name" placeholder="first name" required>
</div>
<div class="input-box">
<span class="details">last name</span>
<input type="text" name="Last Name" placeholder="last name" required>
</div>
</div>
<div class="input-box">
<span class="details">do you use android or apple?</span>
<input type="text" name="Phone" placeholder="android or apple" required>
</div>
<div class="input-box">
<span class="details">what is your @ (ig, discord,twitter)? </span>
<input type="text" name="Social Media" placeholder="ex: @mrbeast (ig)">
</div>
<div class="button-teal" style="cursor: pointer;">
<input type="submit" value="submit">
</div>
</div>
</form>
<span id="msg"></span>
</div>
<script>
const scriptURL = 'https://script.google.com/macros/s/AKfycbynfANMcrwiGsCEoboLpB_6s3I6hcqUDCkFZYrj23hbS5GvqUcE7A2EB5Nu97ioxYY3/exec'
const form = document.forms['submit-to-google-sheet']
const msg = document.getElementById("msg")
form.addEventListener('submit', e => {
e.preventDefault()
fetch(scriptURL, { method: 'POST', body: new FormData(form)})
.then(response => {
msg.innerHTML = "congrats! you're on the waitlist! 🥳"
setTimeout(function(){
msg.innerHTML = ""
}, 5000)
form.reset()
})
.catch(error => console.error('Error!', error.message))
})
</script>
</div>
</body>
</html>