Title: Conditional location
Last modified: April 1, 2019

---

# Conditional location

 *  Resolved [funsail](https://wordpress.org/support/users/funsail/)
 * (@funsail)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditional-location/)
 * I’d like to do this, which I did before CF7 broke JS code
 * if(document.getElementById(‘x’).value==’y’){location = ‘/destination1/’ etc etc
 * so I can go to locations based on a form field value. Is there any way to do 
   this?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Kaspars](https://wordpress.org/support/users/kasparsd/)
 * (@kasparsd)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditional-location/#post-11380417)
 * The redirect destination is currently fixed at that one URL and can’t be changed
   depending on an input value.
 * Here is the [relevant code that is responsible for doing the redirect in JS](https://github.com/kasparsd/contact-form-7-extras/blob/4866e318b618f96fe96fdb6f2d6fcd749399ca27/assets/js/controls.js#L94-L109).

Viewing 1 replies (of 1 total)

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

 * ![](https://ps.w.org/contact-form-7-extras/assets/icon-256x256.png?rev=1917847)
 * [Controls for Contact Form 7 (Redirects, Analytics & Tracking)](https://wordpress.org/plugins/contact-form-7-extras/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-extras/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-extras/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-extras/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-extras/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-extras/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Kaspars](https://wordpress.org/support/users/kasparsd/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/conditional-location/#post-11380417)
 * Status: resolved