HubSpot Ideas

pingle

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

On a form, there is a field with two different responses, which helps to determine the ideal customer. It is very important to have the feature to redirect a visitor to separate thank you pages based on the response. To B2B customers, we sell our products directly but to B2C customers, we redirect them to e-commerce channels (such as eBay or Amazon). In this case, both the types of customers are important. We can use one landing page and form to target both types of audiences to promote the product but redirect them to the relevant offer/content based on the response.

 

Mises à jour HubSpot
February 15, 2024 06:46 AM

Hi folks,

 

I’m Ian, the Product Manager for HubSpot’s Forms tool.

 

Thanks to all of you tha have expressed interest in participating in user testing. You're welcome to continue expressing your interest here. I'll reach out to you directly when we have opportunities to participate. 

 

Any news about this feature request will be relayed on this thread, so stay tuned!

Ian 

Statut mis à jour : Being Reviewed
January 18, 2024 02:35 AM

Hi folks,

 

I’m Ian, the Product Manager for HubSpot’s Forms tool.

 

Thank you all for taking the time to submit, upvote, and comment on this Idea. We hear you loud and clear, and we agree that this functionality is important. We are currently evaluating how our team will implement this idea. If you're interested in participating in user testing, just reply to this thread. 

 

Any news about this feature request will be relayed on this thread, so stay tuned!

Ian 

April 10, 2017 05:17 AM

Migrated from legacy feedback forum with 128 votes.

 

I have a form with a field that asks a question with two different responses. It would be good to have the functionality to redirect to separate thank you pages based on the response.

 

For example, if Mr Lead chooses answer A, they will go to thank you page A, if they choose answer B, they will go to thank you page B.

 

This would allows us to present our leads with content that truly is relevant to them.

139 Commentaires
mrspabs
Contributeur de premier rang | Partenaire solutions Elite

yes, i need this!

kriscone
Membre

I just had this need today.  We are doing an email and paid ads to get people to our tradeshow booth.  I would like to ask, are you attending the tradeshow. 

 

If yes, then go down a path to book a demo time and show them the booking calendar widget that only has the 4 days of the tradeshow as options. Drip with our booth #, and a few other things that make us unique.  

 

If NO, then they go a separate page that has an embedded presentation with an option to book a demo time after the tradeshow, so I would embed my normal calendar into this other page.  

 

Right now, I think the only way to do this is have an initial splash page with 2 CTAs - are you going?  Yes or No and then redirect them to 2 separate landing pages.  Correct?

cchery
Membre

Agreed! Does anyone have a good workaround for this?

LeonardoV
Participant

This is very important for us. We have a company account, and we have many problems with users who register and do not comply with a necessary feature to become a customer. If Hubspot would have this solution we could ask if they have that feature in advance and redirect them to 2 different thank-you pages depending on what they select. Please do it fast !!

LeonardoV
Participant

Yes sir!! This is very important for us! Please develop this functionality because we are desperate to have this solution. Does anyone know an alternative?

sbrucklacher
Membre

YESSSS!!!!!!! I am wanting to create a complex form that would be used for price requests for mutiple models of machines. Since all the machines have different prices I would like to be able to direct the filler to a specific landing page to download that specific price for the machine requested.

 

This would be a very complex form, but would save me form creating many forms that look almost identical.

DaveE
Participant

We really need this functionality too. It's a must-have. 

JesseMont
Membre

I am trying to follow anders solution that he posted but I am using a Dropdown (select) box how would I do the same logic but using a select value instead?

 

<!--[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: "xxxxxxx",
		formId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
		css: "",
		onFormSubmit: function($form) {
			var choice = $('input[name="redirect_choice"]:checked').val(); -- need this to be for a select box based on lead_type
			if (choice == 'Redirect 1') {
				window.location = 'http://www.example-1.com';
			} else if (choice == 'Redirect 2'){
				window.location = 'http://www.example-2.com';
			} else if (choice == 'Redirect 3'){
				window.location = 'http://www.example-3.com';
			}
		} 
	});
</script>
FORCINGMETO
Membre

I don't understand your question - 

anders_grove
Contributeur | Partenaire solutions Elite

Hi, see example using select below:

<!--[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="redirect_select"]').val();
			if (choice == 'Page one') {
				window.location = 'http://www.example-1.com';
			} else if (choice == 'Page Two'){
				window.location = 'http://www.example-2.com';
			} else if (choice == 'Page Three'){
				window.location = 'http://www.example-3.com';
			}
		} 
	});
</script>

 

FORCINGMETO
Membre

Yeah, and it works well. Do you have an issue with it? 

WebSavvy-Team
Membre

Anyone solved this problem yet? Just got a client wanting this 😕

MFall
Membre

Make sure that you DON'T tell hubspot to redirect to another page on the "Options" tab of the form builder. Instead, Diplay a thank you message, write something like "Thank you for submitting the form. You will be redirected shortly." and then you shouldn't have any redirect issues on the window.location piece.

 

 

luribeiro
Membre

I cant believe we dont have this feature yet 😞

 

Kselby
Participant

@anders_grove I am trying to make your setup but for a single checkbox field. When someone checks the box they are directed to one page, and when they don't they are directed to a different page. The issue I am running into is the form does not let me edit the embed code. Where do I place the code?

 

Here is the code I have, does this look correct?

 

<!--[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: "xxxxxxxx",
		formId: "xxxxxxxxxxxxxxxxxxxxxxxxx",
		sfdcCampaignId: "xxxxxxxxxxxxx”,
		onFormSubmit: function($form) {
			var answer = $('input[name=“answer_yes_no”]).val();
			if (answer:checked) {
				window.location = 'http://www.page-1.com';
			} else {
				window.location = 'http://www.page-2.com/product‘;
		} 
	});
</script>
EDG1
Membre

I was surprised to learn this wasn't already a basic level of functionality when it is with other platforms.  Please add this in asap. 

Woodsy
Contributeur de premier rang

Is there a way of adapting @anders_grove code for two sets of radio buttons that covers the various permutations of input?

<!--[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: "xxxxxxx",
formId: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
css: "",
onFormSubmit: function($form) {
var choice = $('input[name="redirect_choice"]:checked').val();
if (choice == 'Redirect 1') {
window.location = 'http://www.example-1.com';
} else if (choice == 'Redirect 2'){
window.location = 'http://www.example-2.com';
} else if (choice == 'Redirect 3'){
window.location = 'http://www.example-3.com';
}
} 
});
</script>

 

ljschwabtx
Membre

Anyone know why when using this code that the object hubspt.forms is not being recognized? 

ChandlerW
Participant

Heck yeah, this worked for us!

 

We ask for Number of Employees in our forms so we can route leads to the right team.

Here's how ours turned out:

 

<!--[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: "XXXXXXX",
    formId: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
    onFormSubmit: function($form) {
        if($form.find('input[name="numberofemployees"]').val() >= 1 && $form.find('input[name="numberofemployees"]').val() < 😎 {
            window.location.href = "https://www.google.com/search?q=smb";
        }else if ($form.find('input[name="numberofemployees"]').val() >= 8 && $form.find('input[name="numberofemployees"]').val() < 26){
            window.location.href = "https://www.google.com/search?q=mm";
        }else {
            window.location.href = "https://www.google.com/search?q=ent";
        }
    }
});
</script>

 

MeravZaks
Membre

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