Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Redirect to different success pages based on form dropdown selection
Regular Contributor | Gold Partner
a month ago
I'm trying to configure the form on this page so that depending on which option is selected in the dropdown field, it will send them to a different landing page:
https://info.marketingninjas.com/seg-evr-project-type
For example:
- if the user selects the Homebuilder option, it will redirect to Landing Page A.
- if they select the Remodeler option, it will redirect to Landing Page B
- and so on...
I found this code on a different thread that was trying to accomplish the same thing based on a checkbox field in the form:
<!--[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: "#######", formId: "########", onFormSubmit: function($form) { if($form.find('input[name="current_giving_customer"]').prop('checked')){ window.location.href = "https://google.com/"; }else{ window.location.href = "https://npr.org"; } } }); </script>
I understand the If/Else logic in the code above. But is it possible to modify the code so that it will be:
- If value = New Homes, then go to LP A
- If value = Remodeling, then go to LP B
- If value = Developer, then go to LP C
- If value = Commercial, then go to LP D
- If value = Other, then go to LP E
- If value = Not a builder, then go to LP F
Thanks so much for your help. New to this and still learning.
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content