I am trying to use 3 different thank you pages based on the option selected in the dropdown.
I tried using the code form
But not getting the desired result. It occasionally works.
window.ub.hooks.afterFormSubmit.push(function() {
var valueNew = $( "#which_kind_of_selfdefense_videos_do_you_want_to_watch" ).val()
console.log(valueNew);
if(valueNew == "Reality-Based Self Defense"){
console.log('case1');
window.history.pushState('', 'New Page Title', 'https://try.ukfightlab.tv/reality-based/');
}
if(valueNew == "Pressure-Points Based Self-Defense"){
console.log('case2');
window.history.pushState('', 'New Page Title', 'https://try.ukfightlab.tv/pressure-point/');
}
if(valueNew == "Chinese/Mystical Self-Defense"){
console.log('case3');
window.history.pushState('', 'New Page Title', 'https://try.ukfightlab.tv/pressure-point/');
}
});