Squarespace Form Redirect (free)

Easily add page redirects to your Squarespace Forms and Newsletter Signups. This free code snippet (plug-in) is a great way to add a nice thank you page after a user submits their information. Below you'll find out how easy it is to make this possible.

 

How-to Install Video - Form Redirect

Below you will find a detailed video that will guide you through how to install and setup this code snippet.

 
Attention: It seems there is an issue with Squarespace when using the Form Redirect on Cover Pages. However, below you can find an alternate version that works on Cover Pages. You can find the Cover Page code located in the "The Code (Cover Page Only)" section.
 

Quick install - Form Redirect

 

1. Create a Form or Newsletter block

Place a Form or Newsletter Block anywhere on the page you'd like.

 

2. Paste Code into the Post-Submit HTML Area

While editing your form, click on the Advanced section in the top right corner. Scroll down a little until you see the Post-Submit HTML text area, and paste the code that I provided into the text area.

Attention: It seems there is an issue with Squarespace when using the Form Redirect on Cover Pages. However, below you can find an alternate version that works on Cover Pages. You can find the Cover Page code located in the "The Code (Cover Page Only)" section.
 

3. Update the Redirect URL, Done

Make sure to change the redirectURL variable to the URL you'd like the form to redirect to once the form has been submitted.

Attention: Make sure you're logged out of the site editor. For the form to work you can't be in edit mode on your Squarespace site.

The code (Excludes Cover Pages)

Simply copy all of the code below and paste it in the Post-Submit HTML text area of the Advanced section while editing your form.

Attention: It seems there is an issue with Squarespace when using the Form Redirect on Cover Pages. However, below you can find an alternate version that works on Cover Pages. You can find the Cover Page code located in the "The Code (Cover Page Only)" section.
<script type="text/javascript">
  // Your Squarespace form redirect URL
  var redirectURL = "http://www.google.com";
     
  // Fixes an issue with IE8 and lower
  if ( navigator.userAgent.match(/MSIE\s(?!9.0)/) ) {
    var referLink = document.createElement( "a" );
    referLink.href = redirectURL;
    document.body.appendChild( referLink );
    referLink.click();

  // Standard redirect for all other browsers
  } else {
    window.location.assign( redirectURL );
  }
</script>
 

The Code (Cover Page Only)

Copy the code below and paste it in the Post-Submit HTML text area of the Advanced section while editing your form on a Cover Page.

<meta http-equiv="refresh" content="0; url=http://www.google.com" />

Release / Update Information

Updated: 03/23/17 - Version 1.0.1
Released: 04/10/16 - Version 1.0.0

 

Need Help installing this Plug-in?

Is the code not working as intended or you're having problems installing this code snippet? Please submit a support ticket on the Code Shop Support page if you need help.