Conditional Redirect Script Issue
-
Hi,
I have the following script:
<script>
document.addEventListener( ‘wpcf7mailsent’, function( event ) {
if ( ‘3683’ == event.detail.contactFormId ) {var Deposit = document.getElementById(“deposit”).value;
if (Deposit == “Yes”) {
location = ‘https://familymattersmediate.co.uk/deposit-payments/’;
} else if (Deposit == “No”) {
location = ‘https://familymattersmediate.co.uk/thank-you/’;
}}
}, false )
</script>
The dropdown menu looks like this[select* menu-90 id:deposit include_blank “Yes” “No”]
the form can be seen here –
https://familymattersmediate.co.uk/referral-form-test/
I’m struggling to understand why the form doesn’t redirect when either options specified above have been selected.
Can someone help please?
Many thanks
The page I need help with: [log in to see the link]
- The topic ‘Conditional Redirect Script Issue’ is closed to new replies.