Setting up multiple page redirects from HubSpot Forms

Using the Redirect form module to send visitors to different pages based on a dropdown select field.

Logical form fields are a big part in ensuring your visitors are looking at the right content at the right point of their journey. Redirecting visitors to the correct page content is a key part of this user experience.   If you want visitors who choose option A to land on page A, and/or option B to page B and so on... The redirect form module is a great choice. 

How does it work?

The module wraps your HubSpot form in special code known as javascript.  What this does is as your visitor is filling in the form, the javascript is running "if-else" logic at the same time.  The simplest version of this, for example; "if {key field} is {optionA} then send to {urlA}, or else do this ____"

What this means for you is you can create 1 to 1, or 1 to many relationships between your form and pages.

Setting up your form

  1. Create your HubSpot form as you would any other
  2. Identify your 'redirect field' this will be the drop down select the javascript is using to trigger its actions (this must be dropdown select, it does not work with text fields or any other type).
  3. Save the internal value for this field and its options.  The internal value is going to be all lowercase and use _ for any spaces or special characters.
  4. Set your form to RawHTML in the options
  5. Publish your form

Setting up your module

  1. From the drag and drop editor search and add FORM WITH REDIRECT to your HubSpot CMS page
  2. Choose your form
  3. Edit form fields only if needed, you should have completed this in the form setup steps
  4. Thank you settings will automatically be overwritten by the module so do nothing here.
  5. Form options, follow up actions, and workflows can be set as you require. 
  6. Open Redirect Field Tab
    1. Insert the internal value of your key redirect field
    2. add as many redirect conditions as options in the key field
    3. Enter the internal value for each option
    4. Select the content, or external link you want each value to send the visitor too.
    5. Leave all other settings as set by default, and apply your changes.