How can I show a thank you message after a form submission?
When a visitor submits a form on a Squarespace website, you can add a post-submit message to be displayed on the same page. Often this is ‘lost’ on the page and visitor never sees it.
One potential solution is to add HTML formatting in the Post-Submit HTML box, instead of simple text. For example, to increase the font size, you could use:
A better solution is to create a ‘thank you’ page, and send visitors to this page after they’ve submitted the form. You can format the thank you page however you like, with headings, images and so on.
You can add HTML code to send the visitor to another page in the same Post-Submit HTML box. You’ll find more information about it in the Squarespace support article Advanced Form Block options.
Here’s an example. Create a ‘thank you’ page with the URL formsubmitted. You can use any URL, but in my example, I’ve used formsubmitted. Add Text Blocks, Image Blocks to the page to meet my needs.
Then, go back to the page with the form, edit the form and add the following in the Post Submit HTML box:
<script> window.location.replace("/formsubmitted"); </script>
So the box looks like this:
Save the changes and then test the script. After you submit the form, you should be redirected to the new page.