I am trying to get my form to redirect after I have showed the thank you message replacing the form on the same LP.
I'm a novice when it comes to JS so would like some guidance.
Solved! Go to Solution.
MktoForms2.whenReady(function(form){
var redirectTimeMs = 4000; // 4 seconds
form.onSuccess(function(vals,thankYouURL){
// whatever you were going to do to show the Thank You message goes here
setTimeout(function(){
document.location.href = thankYouURL;
}, redirectTimeMs);
return false;
});
});
MktoForms2.whenReady(function(form){
var redirectTimeMs = 4000; // 4 seconds
form.onSuccess(function(vals,thankYouURL){
// whatever you were going to do to show the Thank You message goes here
setTimeout(function(){
document.location.href = thankYouURL;
}, redirectTimeMs);
return false;
});
});