# Ability to redirect to multiple thank you page based on form response

**URL:** <https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615>\
**Category:** HubSpot Ideas\
**Tags:** forms\
**Created:** [July 5, 2017, 11:34pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615 "2017-07-05T23:34:09Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![MeravZaks](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/meravzaks/32/92090_2.png) [@MeravZaks](https://community.hubspot.com/u/MeravZaks)\
**Post date:** [June 6, 2019, 8:02am UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/41 "2019-06-06T08:02:00Z")

</div>

I want this option as well. Did anyone manage to solve it through code?

---

<div class="post-metadata">

**Author:** ![PoorviJhawar](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/poorvijhawar/32/15667_2.png) [@PoorviJhawar](https://community.hubspot.com/u/PoorviJhawar)\
**Post date:** [August 1, 2019, 3:29am UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/42 "2019-08-01T03:29:37Z")

</div>

This would be an absolute blessing for us to redirect our demo users in a relevant direction instead of a generic Thank you page and then emailing information. This would cause less friction for the visitors, making it an effortless experience.

---

<div class="post-metadata">

**Author:** ![Peta\_APB](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/peta_apb/32/16798_2.png) [@Peta\_APB](https://community.hubspot.com/u/Peta_APB)\
**Post date:** [August 16, 2019, 2:28am UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/43 "2019-08-16T02:28:13Z")

</div>

Hi there, I’ve been following this thread with great interest and attempting to implement this on a HS landing page. I can’t seem to get this working however so hoping someone could shed some light?  
I’m using multi-dropdown select box in my form, so I’ve been trying to adjust the embed code from [@anders\_grove](https://community.hubspot.com/t5/user/viewprofilepage/user-id/52525) but I’m not 100% certain on how to do this.

I’m using a HTML module in the landing page to embed the modified code, is that correct? It’s just not appearing at all on my page so I’m obviously going wrong somewhere.

Then I’m trying to adjust the code as follows but again, not 100% sure if I’ve got it right - any help would be greatly appreciated:

```auto
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
	hbspt.forms.create({
		portalId: "xxxxxx",
		formId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
		css: "",
		onFormSubmit: function($form) {
			var choice = $('select[name="catagory"]').val(); << Is this the name of the contact property field? >>
			if (choice == 'Dropdown Select Option 1') {
				window.location = 'https://example.com/landingpage1';
			} else if (choice == 'Dropdown Select Option 2'){
				window.location = 'https://example.com/landingpage1';
			} else if (choice == 'Dropdown Select Option 3'){
				window.location = 'https://example.com/landingpage2';
			} else if (choice == 'Dropdown Select Option 4'){
				window.location = 'https://example.com/landingpage3';
			} else if (choice == 'Dropdown Select Option 5'){
				window.location = 'https://example.com/landingpage4';
			}
		} 
	});
</script>

```

Looking forward to any suggestions/corrections :).

Thanks so much.

Peta

---

<div class="post-metadata">

**Author:** ![anders\_grove](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anders_grove/32/99626_2.png) [@anders\_grove](https://community.hubspot.com/u/anders_grove)\
**Post date:** [August 16, 2019, 7:39am UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/44 "2019-08-16T07:39:56Z")

</div>

Hey [@Peta\_APB](https://community.hubspot.com/t5/user/viewprofilepage/user-id/27963),

Your code looks correct. Only thing I can see is maybe the spelling on _catagory_ is wrong?

`$('select[name="catagory"]').val();`

^ This is the name of the select field.

`choice == 'Dropdown Select Option 1'`

^ The value is the value of the select options.  
See below image for a reference:

 ![forms.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/3/e3b59c3c3de9c36f33aa95e21556a410f18b9aa5.png)

Hope that helps!

---

<div class="post-metadata">

**Author:** ![ljschwabtx](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ljschwabtx/32/29368_2.png) [@ljschwabtx](https://community.hubspot.com/u/ljschwabtx)\
**Post date:** [August 16, 2019, 8:14pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/45 "2019-08-16T20:14:19Z")

</div>

[@Peta\_APB](https://community.hubspot.com/t5/user/viewprofilepage/user-id/27963) is your site hosted on Hubspot? I copied this code and tried to use it and nothing happened. It turned out that it was because Hubspot it my CMS so we had to make changes. Happy to share if that helps.

---

<div class="post-metadata">

**Author:** ![Peta\_APB](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/peta_apb/32/16798_2.png) [@Peta\_APB](https://community.hubspot.com/u/Peta_APB)\
**Post date:** [August 19, 2019, 12:49am UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/46 "2019-08-19T00:49:40Z")

</div>

Hi [@anders\_grove](https://community.hubspot.com/t5/user/viewprofilepage/user-id/52525) , thanks for the reply. Yes catagory spelt incorrectly but this error was because when the contact property was created it was done with a typo…hence the internal name is unable to be changed… So I presume I use the internal name for the form field name?  
And @ljschwabtx thanks for the reply as well and yes this is going to be used on a Hubspot landing page, however I am even testing on a ClickFunnels landing page and it’s just not working. Are you able to share what changes you made to get this to work?

Thanks for your help.

Warm regards

Peta

---

<div class="post-metadata">

**Author:** ![FadiGeorge](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/fadigeorge/32/36735_2.png) [@FadiGeorge](https://community.hubspot.com/u/FadiGeorge)\
**Post date:** [October 9, 2019, 2:23pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/47 "2019-10-09T14:23:45Z")

</div>

Yes, please! Upvoted.

---

<div class="post-metadata">

**Author:** ![gu\_dev\_c](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gu_dev_c/32/31184_2.png) [@gu\_dev\_c](https://community.hubspot.com/u/gu_dev_c)\
**Post date:** [October 25, 2019, 5:14pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/48 "2019-10-25T17:14:26Z")

</div>

This is a must. Pushing customers to appropriate landing pages based on an a selection is fairly basic. Grant us the ability to utilize “Thank You Code” and expose the form variables to that code so we can dynamically redirect customers via javascript.

---

<div class="post-metadata">

**Author:** ![notifytech](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/notifytech/32/35608_2.png) [@notifytech](https://community.hubspot.com/u/notifytech)\
**Post date:** [December 16, 2019, 5:09pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/49 "2019-12-16T17:09:53Z")

</div>

It would be great for users to be directed to various thank-you pages depending on an option they have ticked on a form.

---

<div class="post-metadata">

**Author:** ![vylip](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/vylip/32/30191_2.png) [@vylip](https://community.hubspot.com/u/vylip)\
**Post date:** [February 6, 2020, 10:00am UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/50 "2020-02-06T10:00:27Z")

</div>

Absolutley - i neeeeeeeed this as well!

---

<div class="post-metadata">

**Author:** ![jamabryan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jamabryan/32/84489_2.png) [@jamabryan](https://community.hubspot.com/u/jamabryan)\
**Post date:** [February 14, 2020, 2:06pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/51 "2020-02-14T14:06:05Z")

</div>

We need this as well.

I tried using the code but have found that the contact/form information is not consistently making its way to Hubspot nor are we getting notified of the form submission. The redirect is happening faster than the info is getting into Hubspot and then it’s getting lost.

Hubspot suggested changing onFormSubmit to onFormSubmitted, but that didn’t redirect at all.

We’ve gone back to our original solution, which was using PlusThis SmartLinks.

---

<div class="post-metadata">

**Author:** ![ikleveland](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ikleveland/32/48852_2.png) [@ikleveland](https://community.hubspot.com/u/ikleveland)\
**Post date:** [March 17, 2020, 9:51pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/52 "2020-03-17T21:51:51Z")

</div>

This feature is simple. Would literally increase my convergence 10 fold.

Most of the emails end up in spam or go unread when sending the lead the correct page.

COME ON HUBSPOT !!!

---

<div class="post-metadata">

**Author:** ![whybe](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/whybe/32/48852_2.png) [@whybe](https://community.hubspot.com/u/whybe)\
**Post date:** [April 22, 2020, 7:08am UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/53 "2020-04-22T07:08:09Z")

</div>

+1

---

<div class="post-metadata">

**Author:** ![Harris](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/harris/32/84489_2.png) [@Harris](https://community.hubspot.com/u/Harris)\
**Post date:** [May 13, 2020, 12:00am UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/54 "2020-05-13T00:00:31Z")

</div>

This would be great.

---

<div class="post-metadata">

**Author:** ![JoeMayall](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/joemayall/32/83822_2.png) [@JoeMayall](https://community.hubspot.com/u/JoeMayall)\
**Post date:** [June 3, 2020, 5:29pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/55 "2020-06-03T17:29:29Z")

</div>

Hi HubSpot Community,

My name is Joe, I’m the Ideas Forum Manager. I wanted to thank you for your thoughtful comments on this post. Your feedback helps us build better products.

I think this a great Idea! I’m happy to say we are currently reviewing this request and its feasibility. At this time I don’t have any details around timing or delivery, but all updates will be relayed on this thread.

I am changing the status of this idea to Being Reviewed as our team scopes out this work.

Best,  
Joe

---

<div class="post-metadata">

**Author:** ![katherineadelma](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/katherineadelma/32/35493_2.png) [@katherineadelma](https://community.hubspot.com/u/katherineadelma)\
**Post date:** [June 18, 2020, 2:49pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/56 "2020-06-18T14:49:53Z")

</div>

I am looking into this, we have a dropdown for Roles, and i want to redirect the Consumer to a page, while the rest of the roles get a thank you message.

I am not even sure how to go bu this, and i tried Anders’s form but it’s not working at all.

---

<div class="post-metadata">

**Author:** ![MyCaptain](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mycaptain/32/98942_2.png) [@MyCaptain](https://community.hubspot.com/u/MyCaptain)\
**Post date:** [July 10, 2020, 4:41pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/57 "2020-07-10T16:41:03Z")

</div>

We need this! It’s really unfortunate that this idea is not implemented yet. It was posted in 2017. 3 Years Back. Also, an On/Off Button to take care of the forms submissions, like it’s there in google forms will be great.

---

<div class="post-metadata">

**Author:** ![anna\_bielawski](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anna_bielawski/32/103554_2.png) [@anna\_bielawski](https://community.hubspot.com/u/anna_bielawski)\
**Post date:** [July 18, 2020, 1:13pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/58 "2020-07-18T13:13:52Z")

</div>

This would solve so many issues for us - is there a status update or timeline for delivery?

Thanks!

---

<div class="post-metadata">

**Author:** ![LauraCH](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/laurach/32/75413_2.png) [@LauraCH](https://community.hubspot.com/u/LauraCH)\
**Post date:** [August 31, 2020, 1:21pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/59 "2020-08-31T13:21:55Z")

</div>

This is quite basic for people running Marketing campaigns for Saas products! Especially when it comes to automating the optimization of paid media by doing it based in the thank you page for qualified leads instead of everybody!

---

<div class="post-metadata">

**Author:** ![abockler1f](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/abockler1f/32/98480_2.png) [@abockler1f](https://community.hubspot.com/u/abockler1f)\
**Post date:** [September 16, 2020, 7:00pm UTC](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615/60 "2020-09-16T19:00:36Z")

</div>

This would work great for a use case I have right now.

Our client has put together a landing page with a third party. We provided a form for the third party to use so that we can track contacts who convert within HubSpot. The form has two different options people can pick for downloadable content to receive - based on which option they pick, we’d like to return a specific Thank You page with that offer.

[Previous page](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615.md?page=2)

[Next page](https://community.hubspot.com/t/ability-to-redirect-to-multiple-thank-you-page-based-on-form-response/2615.md?page=4)
