Redirect pages with validity form
-
hello! I am using this snippet for redirect to diferents thank you pages depend on dropdown selection.
It works fine. But it is sending when the user doesn′t check required fields.
Do you know how can I fix it?
Thank youdocument.addEventListener( ‘wpcf7submit’, function( event ) {
if ( ‘116’ == event.detail.contactFormId ) {
var selection = document.getElementById(“selection”).value;if (selection == “Problem”) {
location = ‘page1’;
} else if (selection == “Colaboration”) {
location = ‘page2’;
}
else if (selection == “Suges”) {
location = ‘page3’;
}
else if (selection == “Consult”) {
location = ‘page4;
}
}
}, false )
- The topic ‘Redirect pages with validity form’ is closed to new replies.