-
Notifications
You must be signed in to change notification settings - Fork 10
/
contact.html
70 lines (61 loc) · 2.14 KB
/
contact.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="./contact.css" rel="stylesheet">
<title>Contact Form</title>
</head>
<style>
body {
width: 100vw;
display: grid;
place-items: center;
}
</style>
<body>
<div class="container">
<form id="contact-form" action="mailto:[email protected]" method="POST" enctype="text/plain">
<label for="fname">First Name</label>
<input type="text" id="fname" name="firstname" placeholder="Your name..">
<label for="lname">Last Name</label>
<input type="text" id="lname" name="lastname" placeholder="Your last name..">
<label for="email">Email</label>
<input type="text" id="email" name="email" placeholder="Your Email ID..">
<label for="message">Message</label>
<textarea id="message" name="message" placeholder="Your Message.." style="height:200px"></textarea>
<button type="submit"id="submit-form">Submit</button>
</form>
</div>
<!-- <div class="message">
<div>
Fill out this contact form!
</div>
<div>
I will get back to you soon!
</div>
</div>
<div class="contact-form">
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSfM4GodOoRoOspVYz4YoBxImMTrTfBI4ckwjVxNrfV4JD79_w/viewform?embedded=true" width="840" height="609" frameborder="0" marginheight="0" marginwidth="0">Loading…</iframe>
</div>
<div class="message"> -->
<a href="./index.html">Home</a>
</div>
</body>
<script type="text/javascript">
var $form = $('form#contact-form'),
url = 'https://script.google.com/macros/s/AKfycbwq1FoWdBceyy_GK8xRUrzJXoOjg99jktOulbLIavoREOHz8v932Yu58beYtNFWCamm/exec'
$('#submit-form').on('click', function(e) {
e.preventDefault();
var jqxhr = $.ajax({
url: url,
method: "GET",
dataType: "json",
data: $form.serializeObject()
}).success(
// do something
);
})
</script>
</html>