Hey There!
I have the instructions here on how to set up the conditional redirect on your landing pages below. I found this script in the community and made some adjustments to get it working on some of my landing pages.
This script will use a drop-down selection instead of checkboxes but it will provide the desired functionality. :)
To start you will want to set up a Drop Down Menu field in your form, this will allow us to set a URL for each selection so the visitor will be redirected based on the selection. You will then want to name the field and set your desired menu choices.
Once you have set this up you will want to add the script I have pasted below in the Javascripts tab in the builder. You can do this by navigating to the builder and finding the Javascripts tab, then select "Add New Javascript".
Once in the "Manage Scripts" window you can copy and paste the script below into the script field.
<script>
$("#Add Field Name and ID").on('change', function() {
switch ($(this).val()) {
case 'Option 1':
window.module.lp.form.data.url = "Enter desired URL";
break;
case 'Option 2':
window.module.lp.form.data.url = "Enter desired URL";
break;
case 'Option 3':
window.module.lp.form.data.url = "Enter desired URL";
}
});
</script>
Once pasted make sure the placement is set to "Before Body End Tag" then update the the URL's, the Field Name and ID and the Menu Choice Names in the script to match your Drop Down Menu settings, like so:
If you wish to add more options to the script you can copy the script below and paste it starting at line 15.
break;
case 'Option 3':
window.module.lp.form.data.url = "Enter desired URL";
Now that this script has been installed you will want to add the needed jQuery script to the page for this to function. You will want to add this as another script to the page with the placement set to "Head".
Below is the needed jQuery script. :)
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
Once this has been set up you will be able to send visitors to different thank you pages based on their form selection.
I hope this helps!
Nice, thank you for sharing, @Rene.Aussant! My initial thought was trying to work in a Typeform embed - good to know it’s not necessary.
This is exactly what I was looking for, thanks Rene!