HTML form to email
How do I redirect to my own thank-you page after a form submits?
By the FormToMail team · Checked against official sources · Updated
Add a hidden field `<input type="hidden" name="_next" value="https://yoursite.com/thanks">` to the form, or set a default thank-you URL in your FormToMail dashboard; after each submission the visitor is sent there instead of the generic page. With fetch(), there's no redirect at all: you show your own message in the page.
| Service | Custom redirect on Free? |
|---|---|
| FormToMail | Yes: _next field or dashboard setting |
| Web3Forms | Yes (listed on Free) |
| FormSubmit | Yes: _next field |
| Formspree | No: Personal plan and up |
Example
<form action="https://getformtomail.com/f/YOUR_FORM_ID" method="POST">
<input type="hidden" name="_next" value="https://yoursite.com/thanks.html">
<input name="email" type="email" required>
<textarea name="message" required></textarea>
<button>Send</button>
</form>Without any redirect
Use the fetch() pattern and replace the form with a message when ok is true.
Quick answers
My form redirects to an ugly thank-you page, can I customize it?
Yes: _next or the dashboard setting, or submit with fetch() and stay on the page.
How do I track conversions on the thank-you page?
Count visits to your own thank-you URL in your analytics; it's only reached after a successful submit.
Does _next accept any URL?
It must be a full http(s) URL.
What to do next
Create an endpoint and set your thank-you page in the dashboard.
Get your form endpointSources
- Formspree: Plans (official)
- Web3Forms: Pricing (official)
- FormSubmit: documentation on the home page (official)
- MDN: The <form> element
Checked: . Prices, limits and features of other services change: confirm current values at the official links above. Product names belong to their owners; we are not affiliated with them.