Title: Conditional redirect
Last modified: August 31, 2016

---

# Conditional redirect

 *  [MGDel](https://wordpress.org/support/users/mgdel/)
 * (@mgdel)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/conditional-redirect-5/)
 * Hello, like others in the past i’m having this issue:
    i want to conditionally
   redirect based on choice, so
 * i put this code in the additional settings, but it always leads to Google page
   instead of Paypal.
    on_sent_ok: ” if (document.getElementById(‘payment’).value
   ==’Paypal’) {location.replace(‘[http://www.paypal.com&#8217](http://www.paypal.com&#8217);)}
   else { location.replace(‘[http://www.google.com&#8217](http://www.google.com&#8217);)}“
 * i need to redirect to different paypal button pages based on the option selected.
 * i can find only people asking for this but never an answer.
    can i be the lucky
   one? i really need this, else i need to look for another plugin.
 * thanks
 * [https://wordpress.org/plugins/contact-form-7/](https://wordpress.org/plugins/contact-form-7/)

The topic ‘Conditional redirect’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [MGDel](https://wordpress.org/support/users/mgdel/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/conditional-redirect-5/)
 * Status: not resolved