-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.html
More file actions
143 lines (136 loc) · 5.85 KB
/
Copy pathcontact.html
File metadata and controls
143 lines (136 loc) · 5.85 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
---
layout: default
title: Contact
permalink: /contact/
---
<section class="page-hero">
<div class="container">
<h1>Get in Touch</h1>
<p class="subtitle">Tell us about your infrastructure and we'll see what we can do to help you!</p>
</div>
</section>
<section class="page-content">
<div class="container narrow">
<div class="contact-grid">
<div class="contact-form-wrap">
<form id="contact-form" class="contact-form" action="https://formgrid.dev/api/f/pp1nf6ru" method="POST">
<div class="form-group">
<label for="name">Name</label>
<input type="text" id="name" name="name" required placeholder="Your name">
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" id="email" name="email" required placeholder="you@company.com">
</div>
<div class="form-group">
<label for="company">Company</label>
<input type="text" id="company" name="company" placeholder="Your company name">
</div>
<div class="form-group">
<label for="services">What are you looking to migrate?</label>
<select id="services" name="services" required>
<option value="">Select a service...</option>
<option value="databases">Databases (RDS, MongoDB Atlas)</option>
<option value="search">Search (Elasticsearch / OpenSearch)</option>
<option value="cache">Caching (Redis, ElastiCache)</option>
<option value="full">Full Infrastructure</option>
<option value="other">Other / Not sure</option>
</select>
</div>
<div class="form-group">
<label for="message">Tell us what you're looking for</label>
<textarea id="message" name="message" required rows="5" placeholder="Share your current setup, timeline, and any concerns..."></textarea>
</div>
<div class="contact-form__hp" aria-hidden="true">
<label for="contact-company-url">Company website (optional)</label>
<input type="text" id="contact-company-url" name="_honey" tabindex="-1" autocomplete="off">
</div>
<div class="form-group contact-form__captcha">
<span class="contact-form__captcha-label">Before sending, please verify below</span>
<div class="h-captcha" data-sitekey="f97e67a4-ec22-49e2-93f6-655cb872b958"></div>
</div>
<button type="submit" class="btn btn-primary btn-full">Send Message</button>
</form>
<p id="contact-form-status"></p>
</div>
<div class="contact-info">
<div class="info-card">
<h3>Free Assessment</h3>
<p>We'll review your current infrastructure and provide a detailed migration plan with cost projections.</p>
</div>
<div class="info-card">
<h3>Prefer Email?</h3>
<p>Reach us directly at <a href="mailto:hello@bigtechmigration.eu?subject=Big Tech Migration Assessment">hello@bigtechmigration.eu</a></p>
</div>
</div>
</div>
</div>
</section>
<script src="https://js.hcaptcha.com/1/api.js" async defer></script>
<script>
window.addEventListener("load", function () {
var form = document.getElementById("contact-form");
var status = document.getElementById("contact-form-status");
function resetCaptcha() {
if (typeof hcaptcha !== "undefined") {
hcaptcha.reset();
}
}
async function handleSubmit(event) {
event.preventDefault();
var data = new FormData(event.target);
var honey = (data.get("_honey") || "").toString().trim();
if (honey !== "") {
form.style.display = "none";
status.innerHTML = "Thanks for reaching out! We'll be in touch with you soon.";
status.className = "form-status form-status-success";
return;
}
if (typeof hcaptcha === "undefined" || !hcaptcha.getResponse()) {
status.innerHTML = "Please complete the verification challenge.";
status.className = "form-status form-status-error";
return;
}
fetch(event.target.action, {
method: form.method,
body: data,
// Avoid custom Accept (non–safelisted value triggers CORS preflight; FormGrid only allows some request headers).
// FormGrid responds with 3xx → success HTML; following it hits a page without CORS → browser blocks.
redirect: "manual"
})
.then(function (response) {
var redirectOk =
(response.status >= 300 && response.status < 400) ||
response.type === "opaqueredirect";
if (response.ok || redirectOk) {
form.style.display = "none";
status.innerHTML = "Thanks for reaching out! We'll be in touch with you soon.";
status.className = "form-status form-status-success";
return;
}
return response
.json()
.then(function (body) {
if (Object.hasOwn(body, "errors")) {
status.innerHTML = body.errors.map(function (err) { return err.message; }).join(", ");
} else {
status.innerHTML = "Oops! There was a problem submitting your form.";
}
status.className = "form-status form-status-error";
resetCaptcha();
})
.catch(function () {
status.innerHTML = "Oops! There was a problem submitting your form.";
status.className = "form-status form-status-error";
resetCaptcha();
});
})
.catch(function () {
status.innerHTML = "Oops! There was a problem submitting your form.";
status.className = "form-status form-status-error";
resetCaptcha();
});
}
form.addEventListener("submit", handleSubmit);
});
</script>