# How to set up a form thank you page that helps

> Set up a form thank you page, redirect after form submit to your own URL, or show a confirmation message in place, and what to write on it.

Growth

Set up a form thank you page, redirect after form submit to your own URL, or show a confirmation message in place, and what to write on it.

By [Venkatesh](https://www.linkedin.com/in/ageven/) 10 November 2026 · 5 min read

![Cover image: How to set up a form thank you page that helps, a FormDoc guide](https://www.formdoc.dev/images/blog/form-thank-you-page.png)

A form thank you page is the page a visitor sees right after they press “Send”. To set one up, create a normal page on your site (for example `/thanks/`), then tell your form to redirect there after a successful submission. With FormDoc you do that with one hidden `redirect` field. If you’d rather not leave the page, show a confirmation message inside the form instead.

Both are easy. The more interesting question is what that page should say, because it’s the one moment you know a visitor is paying attention.

## Why the form thank you page matters

The moment after someone submits a form is full of small worries. Did it go through? Will anyone read it? When will I hear back? A good confirmation answers all three in a few lines.

Without one, people tend to submit again “just in case”, or email you separately to check. Both create extra work for you. A clear thank you page also feels like the first step of good service, which is a nice impression to leave before you’ve even replied.

## Option 1: redirect after form submit to your own page

This is the most common setup for plain HTML forms. Build a page called something like `/thanks/`, then add a hidden `redirect` field with the full URL:

```html
<form action="https://api.formdoc.dev/v1/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
  <input type="hidden" name="redirect" value="https://example.com/thanks/">

  <label for="email">Email</label>
  <input id="email" type="email" name="email" required>

  <label for="message">Message</label>
  <textarea id="message" name="message" required></textarea>

  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off">
  <button type="submit">Send</button>
</form>
```

A few details to get right:

-   **Use the full address**, starting with `https://`. A relative path like `/thanks/` won’t work, because the redirect comes from FormDoc, not from your site.
-   **Only http and https URLs are accepted.** That stops the field being misused to send people somewhere unexpected.
-   **Use a different thank you page per form** if you want to say different things. Each form can carry its own `redirect` value.
-   **Keep the page out of search results.** A thank you page has nothing to offer someone arriving from Google, so add a `noindex` robots meta tag to it.

## Option 2: the hosted thank you page

If you don’t add a `redirect` field, visitors see FormDoc’s hosted thank you page, which confirms the message was sent and includes a link back to your site. It’s a sensible default while you’re building, and plenty of small sites are happy to leave it that way.

You can switch to your own page at any time by adding the field. Nothing else needs to change.

## Option 3: a confirmation message without leaving the page

Sometimes a page change feels heavy, for example on a newsletter sign-up in a footer, or a short feedback widget. In that case show the confirmation message right where the form was.

The simplest route is FormDoc’s optional script. Add it once to your page:

```html
<script src="https://api.formdoc.dev/formdoc.js" defer></script>
```

It sends the form with fetch, disables the button while sending, and shows success or an error inside the form. The form gets a `data-formdoc-state` attribute (`sending`, `success` or `error`), so you can style each state with CSS. It also fires `formdoc:success` and `formdoc:error` events if you want to run your own code. If JavaScript fails to load, the form still submits normally, so nobody gets stuck.

For more on this approach, including a version written with plain fetch, see [how to submit a form without page reload](https://www.formdoc.dev/blog/submit-form-without-page-reload/) and the [JavaScript docs](https://www.formdoc.dev/docs/javascript/).

## Which option should you use?

| Approach | Best for | Effort | Can show next steps? |
| --- | --- | --- | --- |
| Hosted thank you page | Getting started, simple sites | None | Link back only |
| Your own page via `redirect` | Contact, quote and booking forms | Build one page | Yes, anything you like |
| Inline confirmation message | Short forms, sign-ups, widgets | Add one script | A sentence or two |

If you’re unsure, a custom page is usually the best fit for contact forms. It gives you room to set expectations, and it’s a real URL, which makes it easy to measure as a conversion in your analytics tool.

## What to write on your thank you page

Keep it short and useful. A good form thank you page does four things:

1.  **Confirms it worked.** “Thanks, your message has been sent.” Plain words, no doubt.
2.  **Says what happens next.** “We reply to every message within one working day.” Only promise what you can keep.
3.  **Says where the reply will come from.** If you reply from a specific address, mention it so visitors know to look out for it.
4.  **Offers one next step.** A link to a useful article, your pricing, or simply back to the home page. One link, not ten.

Here’s a simple example:

```html
<h1>Thanks, we’ve got your message</h1>
<p>We reply to every message within one working day, usually sooner.</p>
<p>While you wait, you might like our <a href="/guides/">getting started guides</a>.</p>
<p><a href="/">Back to the home page</a></p>
```

Avoid the temptation to turn the page into an advert. The visitor just did what you asked, so reward them with clarity, not a pop-up.

## When things go wrong

A thank you page only shows on success. Something can still fail, for example a failed captcha check or hitting a rate limit. With the drop-in script, errors appear inside the form so the visitor can fix them and try again without retyping. If you’re building your own JavaScript, the [API reference](https://www.formdoc.dev/docs/api-reference/) lists the JSON error codes you can show.

## Common questions

### Can I pass the visitor’s name to the thank you page?

Not through the redirect itself: FormDoc sends visitors to the exact URL you set. If you want a personal touch, use the inline confirmation approach, where your own script can read the form fields before showing a message.

### Why does my redirect go to the hosted page instead of mine?

Usually the `redirect` value isn’t a full URL. Check that it starts with `https://` and that the hidden input’s `name` is exactly `redirect`. Also check the field sits inside the `<form>` element.

### Should my thank you page be indexed by search engines?

No. It only makes sense after a submission, so add a `noindex` robots meta tag and leave it out of your sitemap. That keeps people from landing on it cold.

## Try it on your own form

If you haven’t got a form yet, start from the [contact form template](https://www.formdoc.dev/templates/contact/) and add the redirect field shown above. Grab a free key at [app.formdoc.dev/new](https://app.formdoc.dev/new) and point it at your new thank you page.

Written by**[Venkatesh](https://www.linkedin.com/in/ageven/)**
