else if statement
-
Hello,
I am trying to get a form that does a redirect depending on the zip code entered. I have tried to use the example found at https://www.ads-software.com/support/topic/plugin-contact-form-7-conditional-redirect-2?replies=4 . If I only use one zipcode, it will work but when I start adding more, it stops working. I have added my code below. Any pointers would be greatly appreciated!
on_sent_ok: ” if (document.getElementById(‘zipcode’).value==23223, 23231, 23219, 23250, 23232, 23075, 23222, 23030, 23227, 23234, 23225, 23224) {location.replace(‘https://furniturehousecalls.com/?p=93’)} else if(document,getElementById(‘zipcode’).value||23114, 23112, 23113, 23838, 23120, 23236, 23235{ location.replace(‘https://furniturehousecalls.com/?p=95’) } else if(document,getElementById(‘zipcode’).value||23233, 23229, 23238, 23226, 23294, 23221, 23230, 23228, 23220, 23111, 23116, 23005, 23060, 23059, 23058{ location.replace(‘https://furniturehousecalls.com/?p=96’) } else if(document,getElementById(‘zipcode’).value||23831, 23832, 23836, 23834, 23801, 23803, 23805, 23860, 23875, 23237{ location.replace(‘https://furniturehousecalls.com/?p=97’) else { location.replace(‘https://www.furniturehousecalls.com/’) } “
- The topic ‘else if statement’ is closed to new replies.