• Resolved adblastbiz

    (@adblastbiz)


    It took me to days of research and mostly trial and error until I got the conditional redirect for drop down options to work the way I wanted it. The example is for 2 different options in the drop down and then your otherwise main page you want people directed to if these two options are not picked. You can follow the pattern to add as many options as you want. I tested in chrome, ie, and ff… all work fine. I know many of you need this. pat on the back will be good enough. thanks. lol

    replace youridnamenospaces with your form id and your drop down value spaces ok with what ever your full drop down value is.
    https://yoururl.com/page1/ …. /page2/ with your pages as well as yoururl.com/page0/’ with what ever page you would otherwise want people to land on…. cheers ??

    on_sent_ok: " if (document.getElementById('youridnamenospaces').value=='your drop down value spaces ok') location = 'https://yoururl.com/page1/'; else if (document.getElementById('sameidnamenospaces').value=='your drop down option #2 spaces ok' ) location = 'https://yoururl.com/page2/'; else location.replace('https://yoururl.com/page0/');"

  • The topic ‘contact form 7 conditional redirect’ is closed to new replies.