Javascript redirect on mail-sent
-
Hello All,
I have the following code to redirect users to different pages depending on the radio button selected on a form on my home page but it isn’t working. Could anyone point me to what I didn’t do right?
Thank you
———————————————<script type=”text/javascript”>
document.addEventListener( ‘wpcf7mailsent’, function( event ) {if ( ‘13130’ == event.detail.contactFormId ) {
var AcquisitionType = document.getElementById(“mc4wp-ACQTYPE”).value;
if (AcquisitionType == “Buying”) {
location = ‘https://afrihood.com/payment/engagement/buying-request/’;
} else if (AcquisitionType == “Renting”) {
location = ‘https://afrihood.com/payment/engagement/rental-request/’;
}else if (AcquisitionType == “Short-let”) {
location = ‘https://afrihood.com/payment/engagement/short-let-request/’;
}}
}, false )
</script>The page I need help with: [log in to see the link]
The topic ‘Javascript redirect on mail-sent’ is closed to new replies.