Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Form with Multiple Redirects
Top Contributor
Apr 30, 2019 12:14 PM
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>
The code supplied by anders_grove is for one question with a set of radio buttons. I'm trying to create a similar thing with two sets of radio buttons. In effect 2 questions, one question with 3 radio buttons and another question with 6 radio buttons.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content