-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontact.html
164 lines (156 loc) · 5.04 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<!-- Google Fonts -->
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@400,500&family=Ruda:wght@500&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="css/contact.css" />
<!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
crossorigin="anonymous"
/>
<title>Balika - Contact</title>
<script
type="text/javascript"
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/email.min.js"
></script>
<script type="text/javascript">
(function () {
emailjs.init("user_jbQiuWJctiCk7EwIuMLdQ");
})();
// TO EXPORT FORM DATA TO GOOGLE SHEET
window.onload = function () {
// sheet currently in RSG drive, shared with balika mail
const scriptURL =
"https://script.google.com/macros/s/AKfycbzGY6F00twGhex0XlvwTikc3n0IWVJxsMetKvEpgZyi54deKfeZ-41SDQ/exec";
const form = document.forms["google-sheet"];
form.addEventListener("submit", (e) => {
e.preventDefault();
fetch(scriptURL, { method: "POST", body: new FormData(form) })
.then((response) => alert("Thank you for contacting us!"))
.catch((error) => console.error("Error!", error.message));
});
};
</script>
</head>
<body>
<!-- navbar section -->
<div id="nav-placeholder"></div>
<!-- banner image -->
<div
class="container-fluid contact-wrapper d-flex justify-content-center align-items-end"
>
<h1 class="text-center text-white mt-5 py-5">Contact Us</h1>
</div>
<!-- Contact Form -->
<div class="container contact-form-wrapper my-5 p-5">
<form id="contact-form" method="post" name="google-sheet">
<div class="form-row">
<div class="form-group col-md-6">
<label for="inputFirstName">First Name</label>
<input
type="text"
class="form-control"
id="inputFirstName"
placeholder="First"
name="first_name"
/>
</div>
<div class="form-group col-md-6">
<label for="inputLastName">Last Name</label>
<input
type="text"
class="form-control"
id="inputLastName"
placeholder="Last"
name="last_name"
/>
</div>
</div>
<div class="form-group">
<label for="inputEmail">Email</label>
<input
type="text"
class="form-control"
id="inputEmail"
placeholder="[email protected]"
name="user_email"
/>
</div>
<div class="form-group">
<label for="inputNumber">Phone Number</label>
<input
type="number"
class="form-control"
id="inputNumber"
placeholder="+91 9831053479"
name="user_phone"
/>
</div>
<div class="form-group">
<label for="inputAddress">Subject</label>
<input
type="text"
class="form-control"
id="inputAddress"
placeholder="Subject Line"
name="subject_name"
/>
</div>
<div class="form-group">
<label for="messageTextInp">Message</label>
<textarea
id="messageTextInp"
class="form-control"
name="user_message"
cols="30"
rows="10"
placeholder="What's on your mind?"
></textarea>
</div>
<div class="container text-center">
<button
type="submit"
class="btn btn-primary text-white px-5 py-3 submit"
>
Submit
</button>
</div>
</form>
</div>
<!-- footer section -->
<div id="footer-placeholder"></div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"
integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI"
crossorigin="anonymous"
></script>
<script>
$(function () {
$("#nav-placeholder").load("snippets/navbar.html");
});
$(function () {
$("#footer-placeholder").load("snippets/footer.html");
});
</script>
</body>
</html>