Free form template
Bootstrap 5 Contact Form Template (HTML)
A contact form using Bootstrap 5 classes, ready for any Bootstrap site. No JavaScript needed; the form posts straight to Formpit.
Preview
The code
<form action="https://formpit.com/f/YOUR_FORM_ID" method="POST" class="container" style="max-width:540px">
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<input id="name" type="text" name="name" class="form-control" required>
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input id="email" type="email" name="email" class="form-control" required>
</div>
<div class="mb-3">
<label for="message" class="form-label">Message</label>
<textarea id="message" name="message" rows="5" class="form-control" required></textarea>
</div>
<input type="text" name="_gotcha" class="d-none" tabindex="-1" autocomplete="off">
<button type="submit" class="btn btn-primary">Send message</button>
</form>- Create a free Formpit form and copy its endpoint from the Setup tab.
- Paste the code into your page and replace
YOUR_FORM_ID. - Submit it once: the message arrives by email and in your inbox.
Tips
- Bootstrap's
d-noneclass hides the honeypot. - Add
was-validatedstyling with a few lines of JavaScript if you want inline validation messages.
More templates
Contact form · File upload form · Newsletter signup form · Waitlist form · Quote request form · Job application form · Event RSVP form · Feedback form · Tailwind CSS contact form · Contact form with CSS