-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.html
112 lines (106 loc) · 5.86 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content />
<meta name="author" content />
<title>Elizabeth Bruce</title>
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
<!-- Custom Google font-->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet" />
<link href="css/styles.css" rel="stylesheet" />
</head>
<body class="d-flex flex-column">
<main class="flex-shrink-0">
<!-- Navigation -->
<nav class="navbar navbar-light bg-white py-3">
<div class="container px-5">
<ul class="navbar-nav d-flex flex-row ms-auto mb-2 mb-lg-0 small fw-bolder">
<li class="nav-item me-3"><a class="nav-link" href="index.html">Home</a></li>
<li class="nav-item me-3"><a class="nav-link"
href="https://www.linkedin.com/in/elizabeth-bruce-a702772/">LinkedIn</a></li>
<li class="nav-item"><a class="nav-link" href="contact.html">Contact</a></li>
</ul>
</div>
</nav>
</nav>
<!-- Page content-->
<section class="py-5">
<div class="container px-5">
<!-- Contact form-->
<div class="bg-light rounded-4 py-5 px-4 px-md-5">
<div class="text-center mb-5">
<h1 class="fw-bolder">Get In Contact!</h1>
</div>
<div class="row gx-5 justify-content-center">
<div class="col-lg-8 col-xl-6">
<form method="POST"
action="https://script.google.com/macros/s/AKfycbwgdPowPVwWZFQ-DfekOfn6zLS2PSsOI7DyoAcqlnVI4d6QdjuasugNysmkNun2G7zI/exec" id="my-form">
<!-- Name input-->
<div class="form-floating mb-3">
<input class="form-control" name="Name" type="text" placeholder="Name" required />
<label for="name">Full Name</label>
<div class="invalid-feedback" data-sb-feedback="name:required">A name is required.
</div>
</div>
<!-- Email address input-->
<div class="form-floating mb-3">
<input class="form-control" name="Email" type="email" placeholder="Email"
required />
<label for="email">Email address</label>
<div class="invalid-feedback" data-sb-feedback="email:required">An email is
required.</div>
<div class="invalid-feedback" data-sb-feedback="email:email">Email is not valid.
</div>
</div>
<!-- Business input-->
<div class="form-floating mb-3">
<input class="form-control" name="Business/Organization" type="text"
placeholder="Business/Organization" required />
<label for="name">Business/Organization</label>
<div class="invalid-feedback" data-sb-feedback="name:required">A
Business/Organization is required.
</div>
</div>
<!-- Message input-->
<div class="form-floating mb-3">
<textarea class="form-control" name="Message" id="message"
placeholder="Enter your message here..." style="height: 10rem"
required></textarea>
<label for="message">Message</label>
</div>
<!-- Submit Button-->
<div class="d-grid"><button class="btn btn-primary btn-lg" id="submitButton"
type="submit">Submit</button></div>
</form>
<script>
window.addEventListener("load", function() {
const form = document.getElementById('my-form');
form.addEventListener("submit", function(e) {
e.preventDefault();
const data = new FormData(form);
const action = e.target.action;
fetch(action, {
method: 'POST',
body: data,
})
.then(() => {
alert("Success!");
});
});
});
</script>
</div>
</div>
</div>
</div>
</section>
</main>
</body>
</html>