-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontactus.php
More file actions
174 lines (161 loc) · 10.9 KB
/
contactus.php
File metadata and controls
174 lines (161 loc) · 10.9 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
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
165
166
167
168
169
170
171
172
173
174
<?php
session_start();
require_once "redirect.php";
require_once "includes/config.php";
$_GLOBALS["pageTitle"] = "Contact Us";
?>
<!doctype html>
<html lang="en" class="bg-info">
<head>
<?php include "includes/head-tag-contents.php"; ?>
</head>
<body>
<?php include "includes/navigation.php"; ?>
<section class="container-fluid px-0 bg-info">
<div class="container p-lg-5 p-md-4 p-3 px-0">
<div class="bg-light rounded-5 p-lg-5 p-md-4 p-3">
<h1 class="mb-ms-5 mb-3"><?= $_GLOBALS["pageTitle"] ?></h1>
<?php
if (isset($_SESSION['notice'])) {
echo '<div class="alert alert-info">' . $_SESSION['notice'] . '</div>';
unset($_SESSION['notice']);
}
?>
<section class="bg-light">
<div class="container">
<p class="text-secondary lead">Have questions about our dog boarding services or
ready to schedule your pet's stay? <b>We're here to help!</b></p>
<hr class="w-75 mx-auto mb-3 mb-xl-5 border-dark-subtle">
</div>
<div class="container">
<div class="row justify-content-lg-center">
<div class="col-12 col-lg-9 px-0">
<div class="bg-white border rounded shadow-sm overflow-hidden redblock">
<form method="post" action="/contactus-mail.php" id="contact-us-form">
<div class="row gy-4 gy-xl-5 p-4 p-xl-5">
<!-- Honeypot field for spam bots -->
<div class="d-none">
<label for="fax_number">Fax Number</label>
<input type="text" name="fax_number" id="fax_number" value="">
</div>
<div class="col-12">
<label for="name" class="form-label">Name <span
class="text-danger">*</span></label>
<input type="text" class="form-control" id="name" name="name" value=""
required>
</div>
<div class="col-12 col-md-6">
<label for="email" class="form-label">Email <span
class="text-danger">*</span></label>
<div class="input-group">
<span class="input-group-text">
<i class="bi bi-envelope"></i>
</span>
<input type="email" class="form-control" id="email" name="email"
value="" required>
</div>
</div>
<div class="col-12 col-md-6">
<label for="phone" class="form-label">Phone Number</label>
<div class="input-group">
<span class="input-group-text">
<i class="bi bi-telephone"></i>
</span>
<input type="tel" class="form-control" id="phone" name="phone"
value="">
</div>
</div>
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="mb-3">
<label class="form-label d-block">Request a quote</label>
<div class="btn-group" role="group">
<input type="radio" class="btn-check" name="quote" id="quoteDaycare" value="daycare" autocomplete="off" onChange="onQuoteChange()" checked>
<label class="btn btn-outline-primary" for="quoteDaycare">Daycare</label>
<input type="radio" class="btn-check" name="quote" id="quoteBoarding" value="boarding" autocomplete="off" onChange="onQuoteChange()">
<label class="btn btn-outline-primary" for="quoteBoarding">Boarding</label>
</div>
</div>
<div class="input-group d-none my-3" id="boardingDates">
<span class="input-group-text">From</span>
<input class="form-control" type="date"
name="boardingFrom" />
<span class="input-group-text">to</span>
<input class="form-control" type="date" name="boardingTo" />
</div>
<div class="input-group my-3">
<span class="input-group-text">Type/breed</span>
<input class="form-control" type="text" name="dogType" />
</div>
<div class="input-group my-3">
<span class="input-group-text">Age</span>
<input class="form-control" type="text" name="dogAge" />
</div>
<div class="my-3">
<label class="form-label d-block">Dog State</label>
<div class="btn-group" role="group">
<input type="radio" class="btn-check" name="dogState" id="dogStateIntact" value="intact" autocomplete="off">
<label class="btn btn-outline-primary" for="dogStateIntact">Intact</label>
<input type="radio" class="btn-check" name="dogState" id="dogStateNeutered" value="neutered" autocomplete="off">
<label class="btn btn-outline-primary" for="dogStateNeutered">Neutered</label>
</div>
</div>
<div class="form-check form-switch ios-switch my-3 d-flex align-items-center gap-3 ps-0">
<input class="form-check-input m-0" type="checkbox" value="yes"
id="dogVaccinations" name="dogVaccinations">
<label class="form-check-label" for="dogVaccinations">
Vaccines completed within a year (prepare to show
documentation).
</label>
</div>
</div>
</div>
</div>
<div class="col-12">
<label for="message" class="form-label">Message</label>
<textarea class="form-control" id="message" name="message"
rows="6"></textarea>
</div>
<div class="col-12">
<div class="d-grid">
<button class="btn btn-primary btn-lg g-recaptcha" type="submit"
data-sitekey="<?= $RECAPTCHA_SITE_KEY ?>"
data-callback="onContactUsSubmit"
data-action="submit">Submit</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include "includes/footer.php"; ?>
<script src="https://www.google.com/recaptcha/api.js"></script>
<script>
function onContactUsSubmit(token) {
var form = document.getElementById("contact-us-form");
if (form.checkValidity()) {
form.submit();
} else {
event.preventDefault()
event.stopPropagation()
}
}
function onQuoteChange() {
var form = document.getElementById("contact-us-form");
var quote = new FormData(form).get('quote');
if (quote == "boarding") {
document.getElementById('boardingDates').classList.remove('d-none');
} else {
document.getElementById('boardingDates').classList.add('d-none');
}
}
</script>
</body>
</html>