Skip to main content

Hi Everyone,


I was using the following code on my LP to split users based on their response to a drop-down field in my form. Depending on their selection to the dropdown, they were sent to a different thank you / confirmation page.


<script>  
jQuery(document).ready(function() {
jQuery('select#select_option').change(function() {
window.module.lp.form.data.confirmData = ({
"I am interested in new hearing aids" : "https://promo.ziphearing.com/thanks",
"I need service on my current hearing aids" : "https://promo.ziphearing.com/service-resound/"
})[jQuery(this).val()];
});
});
</script>

For whatever reason, just today the script stopped working. Any ideas on a solution or alternative code?


This is one of the pages I am using it on: https://promo.ziphearing.com/phonak-testing/


Thanks in advance!

Hi @Evan-Dario,


The script you’ve shared above seems a bit edited so make sure you are using the exact script shared here in the community.


Also make sure you are loading the necessary jQuery library.


Last but not least, swap out all instances of:


window.module.lp.form.data.confirmData


with this:


window.module.lp.form.data.url


Best,

Hristian


Thanks @Hristian


I am having trouble tracking down the original script. Do you know where I can find it?


Thanks,


Evan


Here is the script I think you’ve used: Form Redirect Based on Dropdown Field Value


Thanks so much - swapping out

window.module.lp.form.data.confirmData


with


window.module.lp.form.data.url


seems to have solved the issue.


Out of curiosity - why is it that suddenly we need to make this change?


Reply