WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. imblue
    Member
    Posted 5 months ago #

    Hello.
    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.

    https://wordpress.org/plugins/contact-form-7/

  2. imblue
    Member
    Posted 5 months 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
    Member
    Posted 5 months ago #

Reply

You must log in to post.

About this Plugin

About this Topic