Contact form · Bootstrap
Contact form for Bootstrap sites
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.
- 500 free / month
- One endpoint
- No backend code

Key benefits
No backend code
No server, API route, or SDK. Your Bootstrap form posts straight to one endpoint.
Straight to your inbox
Every submission is emailed to you and saved to a searchable dashboard — spam filtered before it reaches you.
Design without limits
It's your own Bootstrap markup and styles. Splitforms is only the backend, so nothing constrains how the form looks.
Copy-paste ready
Your Bootstrap contact form, ready to paste.
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.
How to add it
How to add a contact form to a Bootstrap website.
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.
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.
Drop the Bootstrap snippet into your project
Copy the Bootstrap code example into your project and replace YOUR_ACCESS_KEY with the key from step 1.
Receive submissions in your dashboard
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
Where do your Bootstrap form 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.
- 500 submissions a month, free to start
- Honeypot + automatic spam scoring on every plan
- Signed webhooks to Slack, Discord, your server

No backend needed
Do you need a backend for a Bootstrap form? No.
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.
- Native Bootstrap 5 validation classes — .form-control, .form-label, .form-select, .invalid-feedback
- Works with every Bootstrap theme (Bootswatch, MDB, Tabler, Tailwind+Bootstrap)
- Smart spam filtering on the splitforms side — drop reCAPTCHA, keep conversion

Best practices
What a production-ready Bootstrap form needs.
The difference between a form that works in the demo and one that survives launch traffic — the production-tested defaults, in priority order.
- Use the .needs-validation + novalidate + .was-validated trio verbatim — it's Bootstrap's official validation contract. Don't reinvent validation UI on top of it.
- Wrap each field in a .mb-3 (or .col-12 inside a .row.g-3 grid) with the .form-label, the input, and a .invalid-feedback div as siblings — Bootstrap's CSS selectors expect that structure.
- Use .form-select for dropdowns, not <select class="form-control">. Bootstrap 5 split selects from text inputs; styling a <select> with .form-control under-renders in 5.x.

How do I add a Bootstrap contact form?
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.
Does splitforms need Bootstrap's JavaScript bundle?
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.
How do I show server-side per-field errors with .is-invalid?
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.
Bootstrap 4 vs Bootstrap 5 — does it matter for splitforms?
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.
How do I handle form errors in Bootstrap?
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.
Can I use this with Bootstrap-flavored frameworks (MDB, Bootswatch, Tabler)?
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.
Show 3 more questions
needs-validation + novalidate is a pair — drop either and validation double-fires or never fires
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.
.invalid-feedback stays display:none without .was-validated on the form or .is-invalid on the field
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 dropped jQuery — but many themes still bundle it and double-bind submit
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
Start free. Upgrade when you need more.
Ship your Bootstrap contact form in 60 seconds.
Free to start on 500 submissions a month. Need Slack alerts, signed webhooks, or file uploads? Pro unlocks them for $5/mo — so you only pay once you outgrow free.
- No credit card required
- 500 free submissions
- Setup in minutes

