Get your free splitforms access key
Sign up at splitforms.com, verify your email, and copy your access key from the dashboard. No credit card required.
Contact form · Bootstrap
Bootstrap 5's form components handle the UI; splitforms handles the backend. Use .form-control + .was-validated for native validation, POST to splitforms, and ship a working contact form in minutes.

No server, API route, or SDK. Your Bootstrap form posts straight to one endpoint.
Every submission is emailed to you and saved to a searchable dashboard — spam filtered before it reaches you.
It's your own Bootstrap markup and styles. Splitforms is only the backend, so nothing constrains how the form looks.
Copy-paste ready
Replace YOUR_ACCESS_KEY with the key from your dashboard — that's the whole integration. No SDK to install, no build step, just the html you already write.
<form id="contact" class="row g-3 needs-validation" novalidate>
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
<div class="col-12">
<label for="name" class="form-label">Name</label>
<input id="name" name="name" type="text" class="form-control" required />
<div class="invalid-feedback">Please enter your name.</div>
</div>
<div class="col-12">
<label for="email" class="form-label">Email</label>
<input id="email" name="email" type="email" class="form-control" required />
<div class="invalid-feedback">Please enter a valid email.</div>
</div>
<div class="col-12">
<label for="topic" class="form-label">Topic</label>
<select id="topic" name="topic" class="form-select" required>
<option value="" selected disabled>Choose a topic…</option>
<option value="sales">Sales</option>
<option value="support">Support</option>
<option value="other">Other</option>
</select>
<div class="invalid-feedback">Please pick a topic.</div>
</div>
<div class="col-12">
<label for="message" class="form-label">Message</label>
<textarea id="message" name="message" rows="4" class="form-control" required></textarea>
<div class="invalid-feedback">Don't forget the message.</div>
</div>
<!-- Honeypot — invisible to humans -->
<input type="checkbox" name="botcheck" class="d-none" tabindex="-1" />
<div class="col-12">
<button type="submit" class="btn btn-primary">Send message</button>
<span id="status" class="ms-2 text-muted small"></span>
</div>
</form>
<script>
(() => {
const form = document.getElementById("contact");
const status = document.getElementById("status");
form.addEventListener("submit", async (e) => {
e.preventDefault();
form.classList.remove("was-validated");
if (!form.checkValidity()) { form.classList.add("was-validated"); return; }
const btn = form.querySelector('button[type="submit"]');
btn.disabled = true;
status.textContent = "Sending…";
try {
const res = await fetch("https://splitforms.com/api/submit", {
method: "POST",
body: new FormData(form),
});
const data = await res.json();
if (data.success) {
status.textContent = "Thanks — we'll be in touch.";
form.reset();
} else {
// Server-side error → flag the offending field Bootstrap-style.
// Add .is-invalid to the input and its sibling .invalid-feedback shows.
status.textContent = data.message || "Something went wrong.";
}
} catch {
status.textContent = "Network error — please try again.";
} finally {
btn.disabled = false;
}
});
})();
</script>How to add it
To add a contact form to a Bootstrap website you need three things: a free splitforms access key, the html snippet above, and your key pasted into it. No backend, server, or SDK — the form posts to one URL and every submission lands in your inbox and dashboard.
Sign up at splitforms.com, verify your email, and copy your access key from the dashboard. No credit card required.
Copy the Bootstrap code example into your project and replace YOUR_ACCESS_KEY with the key from step 1.
Submissions arrive in the splitforms dashboard within seconds. Free includes owner email notification attempts; Pro adds Slack, Discord, Sheets, or any signed webhook URL.
Where submissions go
Every submission is emailed to you and saved to a searchable dashboard — spam filtered before it ever reaches you. Search, export to CSV, or forward it to a webhook or Slack on Pro.

No backend needed
Your Bootstrap form posts standard FormData to one URL. Splitforms validates the access key, runs its spam checks, and forwards it to your email — so there's no server, API route, or database for you to build or maintain.

Best practices
The difference between a form that works in the demo and one that survives launch traffic — the production-tested defaults, in priority order.

How SplitForms works
splitforms receives the submission, filters spam, saves it to your dashboard and emails you — then, on paid plans, sends it on to your webhooks and integrations. No backend infrastructure to build.

Point your form to your unique SplitForms endpoint. That's it.

We instantly capture and organize every submission in your inbox.

Send data to email, spreadsheets, CRMs, webhooks, and 7,000+ apps.

No credit card required. Set up in under 60 seconds.
Connect & automate
On paid plans, submissions can also go to Slack, Discord, Google Sheets, Notion, Airtable, Zapier or any signed webhook — and splitforms works on the platforms you build on, from WordPress and Shopify to Next.js. With Stripe connected, your forms can take payments too.

Questions
Copy the snippet above, include Bootstrap 5's CSS (bootstrap.min.css) on the page, and replace YOUR_ACCESS_KEY with your splitforms key. The form validates client-side via .needs-validation, then POSTs to splitforms through fetch and shows the result inline in the #status span.
No. The contact-form snippet uses plain fetch plus Bootstrap's CSS validation classes. The Bootstrap JS bundle is only needed if the same page also uses dropdowns, modals, or offcanvas. You can ship the form with just the stylesheet.
When splitforms returns { success: false, message }, add the .is-invalid class to the relevant input (emailField.classList.add('is-invalid')) and write the error text into its sibling .invalid-feedback div. Bootstrap's CSS reveals .invalid-feedback automatically whenever the preceding control has .is-invalid. Clear the class before the next submit.
No — the POST is identical. Bootstrap 5 renamed .form-group to .mb-3, split selects out into .form-select, and dropped the jQuery dependency. If you're on Bootstrap 4, swap .form-select for <select class="form-control"> and keep the rest of the snippet as-is.
Two layers. Client-side: the .needs-validation + .was-validated pattern handles required/format errors with no JavaScript beyond the one-line checkValidity switch. Server-side: read data.message from the splitforms response and either render it in a #status element or flag the offending field with .is-invalid so its .invalid-feedback shows.
Yes — they all extend Bootstrap's class system, so .form-control, .form-label, .form-select, and .invalid-feedback all work unchanged. MDB ships its own .validate() JS; if you enable it, let MDB drive client validation and keep the fetch handler only for delivery.
Bootstrap's client-side validation contract is two attributes working together: <form class="needs-validation" novalidate>, plus a submit handler that adds .was-validated. The novalidate attribute turns off the browser's native bubbles so Bootstrap's .invalid-feedback styling is the only UI; .needs-validation is the selector your JS targets. Forget novalidate and you get two sets of error UI (native + Bootstrap) fighting each other. Drop .needs-validation and your querySelectorAll('.needs-validation') finds nothing, so no fields ever get validated. Copy the pair verbatim.
Bootstrap's CSS is .was-validated .invalid-feedback { display: block } and .is-invalid ~ .invalid-feedback { display: block }. Render .invalid-feedback divs but never add .was-validated to the form (or .is-invalid to the specific input) and the feedback stays invisible — users click Send and nothing appears. For client-side errors use the .was-validated form-level switch (the snippet above); for server-side per-field errors from splitforms (e.g. a rejected email), target the specific input: emailInput.classList.add('is-invalid') and write the message into its sibling .invalid-feedback.
Bootstrap 5's dropdowns, modals, and offcanvas are vanilla JS, but plenty of themes (AdminLTE derivatives, older SB Admin, bootswatch+jQuery combos) still ship jQuery and call $(form).submit(...). If the theme's jQuery handler and your fetch handler both bind to the same form, the form can POST twice — or the theme handler calls e.preventDefault() and silently cancels yours. Open DevTools → Event Listeners on the <form>, confirm only your handler is bound, and strip legacy attributes like data-toggle="validator" and data-toggle="form-validator" that re-attach third-party validators.
Simple pricing
Free gives you 500 submissions for $0 — no card, no time limit. Pro is $5/month for 5,000 submissions a month, and Annual is $49/year for 15,000 a month with every Pro feature.
For side projects and indie devs.
Every paid feature, for agencies and growing products.
Every Pro feature with triple the volume — $0.27 per 1,000 at full use.
No credit card required on Free • Cancel anytime • Full pricing and FAQ