Bootstrap multi-step form
Build a multi-step form with Bootstrap 5 and no backend. Keep every field in one form, show one step at a time by toggling d-none, and post once at the end. Copy the markup and add your access key.
How to build it
- Create a form in your Formpaste dashboard and copy its access key.
- Copy the markup and script below into your page.
- Replace YOUR_ACCESS_KEY_HERE with your access key, then publish.
Prompt for your AI coding agent
Give me a Bootstrap 5 multi-step form that POSTs once to https://api.formpaste.com/submit with a hidden access_key input. Show one fieldset at a time by toggling d-none with a few lines of vanilla JavaScript, with Back and Next buttons using btn btn-secondary and btn btn-primary. Make Next validate the visible step with reportValidity before advancing, so a required field hidden by d-none cannot block the final submit. Do not post on every step and do not add a backend.Or connect the Formpaste MCP server to Claude Code, Codex, Cursor, Claude Desktop, VS Code, or any mcp-remote client. See the setup guide.
Bootstrap gotchas
Bootstrap styles the form, Formpaste receives it. Point a normal Bootstrap form at the Formpaste endpoint, keep the hidden access key, and submissions land in your inbox. There is no plugin, no jQuery, and no backend of your own.
It is a normal form with Bootstrap classes
Nothing about Bootstrap changes how a form submits. Add form-label, form-control and btn btn-primary to the usual markup, set the action to the Formpaste endpoint, and the browser posts it. Bootstrap only supplies the styling.
Validation styles are presentation only
was-validated, is-invalid and invalid-feedback style the form in the browser. They do not filter spam and they do not validate anything server-side. Formpaste still applies its own spam filtering after the post.
Use the Bootstrap 5 class names
Bootstrap 5 renamed several form classes: form-group became mb-3, custom-select became form-select, and form-control-file became form-control. If you are copying an older Bootstrap 4 snippet, update those names or the styling will not apply.
Keep the hidden access_key
Leave the hidden access_key input in place so Formpaste knows which form the submission belongs to. It is a normal input, so Bootstrap's styles ignore it.
What to get right
One form, several screens
A multi-step form is a single submission split across steps in the UI. Collect all the fields in client state, then post once at the end.
Route per step is optional
You can give each step its own URL for back-button support, or keep it all on one page with local state. Both post the same final payload.
Post the whole payload once
Do not post on every step. Gather the fields as the user advances and send one request when they finish.
How it works
Three simple steps for form submissions to land in your email inbox.
Create your form, set your form's action URL to Formpaste's endpoint, and add your access key.
Create your form
Sign up, verify your email, and create an access key in your dashboard.
Copy the code
Paste the snippet above into your project. Pick CSS or Tailwind to match your site.
<form id="form" action="https://api.formpaste.com/submit" method="POST">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY_HERE">
<fieldset data-step>
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<input type="text" class="form-control" id="name" name="name" required>
</div>
</fieldset>
<fieldset data-step class="d-none">
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" class="form-control" id="email" name="email" required>
</div>
</fieldset>
<fieldset data-step class="d-none">
<div class="mb-3">
<label for="message" class="form-label">Message</label>
<textarea class="form-control" id="message" name="message" rows="4"></textarea>
</div>
</fieldset>
<button type="button" id="back" class="btn btn-secondary d-none">Back</button>
<button type="button" id="next" class="btn btn-primary">Next</button>
<button type="submit" id="send" class="btn btn-primary d-none">Submit</button>
</form>
<script>
const steps = document.querySelectorAll("[data-step]");
const back = document.getElementById("back");
const next = document.getElementById("next");
const send = document.getElementById("send");
let step = 0;
function render() {
steps.forEach((s, i) => s.classList.toggle("d-none", i !== step));
back.classList.toggle("d-none", step === 0);
next.classList.toggle("d-none", step === steps.length - 1);
send.classList.toggle("d-none", step !== steps.length - 1);
}
back.addEventListener("click", () => {
if (step === 0) return;
step--;
render();
});
next.addEventListener("click", () => {
// Validate the visible step before advancing. Hidden required fields are
// still checked at submit time, so an empty earlier step would otherwise
// block the post with no message the visitor can see.
const invalid = steps[step].querySelector(":invalid");
if (invalid) { invalid.reportValidity(); return; }
step++;
render();
});
render();
</script>
Add your access key
Replace the placeholder with your access key to start receiving submissions.
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY_HERE">Bootstrap multi-step form FAQ
Paste a form. Get submissions.
Instantly without setting up any backend, servers or databases. 250 submissions/mo free - no credit card.