Contact Form 7
Redirect on an condition? (3 posts)

  1. imblue
    Posted 2 years ago #

    I have one select field in my form and would like to redirect the user to three different pages on behalf of what the user choose.

    My Form:
    [select* menu-order default:3 id:order "Apple" "Orange" "Apple And Orange"]

    Then in "Additional Settings" i have this line:
    on_sent_ok: " if (document.getElementById('order').value=='Apple') {location.replace('http://www.apple.com')} else { location.replace('http://www.Orange.com')} "

    But that does just work for two of the options. How can i add an extra "if"? I have tried adding one exact the same as the first "if" but it wont work.

    Thank you.


  2. imblue
    Posted 2 years ago #

    I can't figure this out....

    Anyone? I have three conditions and need to redirect to one of them based on what the user choose.

  3. buzztone
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic