Title: Conditoinal fields not working
Last modified: April 23, 2019

---

# Conditoinal fields not working

 *  Resolved [brianread](https://wordpress.org/support/users/brianread/)
 * (@brianread)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/)
 * My Conditional fields have just stopped working:
 * [https://englishcountrymusicweekend.org.uk/weekend-tickets/](https://englishcountrymusicweekend.org.uk/weekend-tickets/)
 * The top selector “Paypal” or “BACS” should show the selection next to it. Conditionals
   in the mail message also have stopped working:
 * I am geting this now:
 * [paypal]Payment by Paypal[/paypal]
    [BACS]Payment by BACS or cheque[/BACS]
 * whereas on the 19th I got this:
 * Payment by Paypal
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fconditoinal-fields-not-working%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/#post-11461662)
 * the plugin’s scripts.js file is not loaded. The conditional fields scripts are
   called in the ‘wpcf7_enqueue_scripts’ action hook, which is native to Contact
   Form 7.
 * This is also causing your plugin to not be validated by an ajax call, but your
   page is reloaded on submission. Is this something you did intentionally?
 * The Conditional Fields plugin depends on the correct working of Contact Form 
   7, so the first step would be to disable the Conditional Fields plugin and try
   to fix the ajax submission in CF7. [https://contactform7.com/why-isnt-my-ajax-contact-form-working-correctly/](https://contactform7.com/why-isnt-my-ajax-contact-form-working-correctly/)
 *  Thread Starter [brianread](https://wordpress.org/support/users/brianread/)
 * (@brianread)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/#post-11462210)
 * I have looked at the template code and confirmed the wp_header() and wp_footer()
   and also validated the html.
 * However I am using some of my own javascript as well, through a plugin which 
   allows that. That might be the problem.
 * What I am not clear about is why it worked until the update 3 days ago?
 * As this form is live just now I can’t really play with it too much.
 * **Where can I find a zip of 1.4.3 ** so that i can restore the functionality 
   and then later clone it and see if i can get to the bootom of it?
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/#post-11462237)
 * You can download all previous versions from the Advanced tab: [https://wordpress.org/plugins/cf7-conditional-fields/advanced/](https://wordpress.org/plugins/cf7-conditional-fields/advanced/)
 * Scroll down and select the version you want.
 * If the form works with the older version, could you let me know? I’d like to 
   check why it works with version 1.4.3
 *  Thread Starter [brianread](https://wordpress.org/support/users/brianread/)
 * (@brianread)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/#post-11462313)
 * yes, confirming that it “works” with 1.4.3.
 * However I think your point above is also true – the ajax is not working for another
   reason.
 * You can see it working at top of the form – selecting paypal or BACS results 
   in the next column reflecting that choice, Wiht 1.5 it remained blank.
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/#post-11465541)
 * I have a suspicion that somewhere in your theme or in a plugin or in your wp-
   config.php file you might be calling setting this:
 * `define('WPCF7_LOAD_JS', false);`
 * Can you check if this is the case? The simplest way to do this would probably
   be to edit your functions.php file and simply add this PHP code.
 * `echo WPCF7_LOAD_JS ? 'WPCF7_LOAD_JS is true' : 'WPCF7_LOAD_JS is false';`
 * Then refresh any page of your website and at the top it should say WPCF7_LOAD_JS
   is either true or false.
 *  Thread Starter [brianread](https://wordpress.org/support/users/brianread/)
 * (@brianread)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/#post-11465566)
 * Yes, you are correct It does show that.
 * I’ll download the complete tree and then go a grep across it all anbd see where
   the offending line is..
 *  Thread Starter [brianread](https://wordpress.org/support/users/brianread/)
 * (@brianread)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/#post-11465614)
 * ok, found it, in the paypal addon for Contact &:
 * ./plugins/contact-form-7-paypal-add-on-pro/includes/redirect_methods.php: define(‘
   WPCF7_LOAD_JS’, false);
 *  Thread Starter [brianread](https://wordpress.org/support/users/brianread/)
 * (@brianread)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/#post-11465646)
 * ok, I’ve found that is is associated with sonmething in that plug called “Redirect
   Method” which if set to “Method 2” calls that false setting.
 * I’ve checked that changing the redirect to “method 1” leaves the variable to 
   true.
 * Am now checking that the form still works properly using youjr version 1.4.3,
   and wil then update to 1.5 and try it again.
 *  Thread Starter [brianread](https://wordpress.org/support/users/brianread/)
 * (@brianread)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/#post-11465690)
 * ok, confirming that with that change to Redirect method 1 in the paypal addition
   to Contact 7 your version 1.5 seems to work fine now.
 * And it is clearly using ajax on the submit rather than refreshing the form now.
 * Many thanks for the help.
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/#post-11465741)
 * Thanks for your analysis and follow up. This is extremely helpful. I’m going 
   to reconsider when the Conditional fields scripts needs to be loaded, as it looks
   like CF7 can work without it’s native scripts. So only loading the conditional
   fields scripts if the CF7 script is loaded, is probably not my best approach 
   🙂

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Conditoinal fields not working’ is closed to new replies.

 * ![](https://ps.w.org/cf7-conditional-fields/assets/icon-256x256.png?rev=2072595)
 * [Conditional Fields for Contact Form 7](https://wordpress.org/plugins/cf7-conditional-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-conditional-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-conditional-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-conditional-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-conditional-fields/reviews/)

 * 10 replies
 * 2 participants
 * Last reply from: [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/conditoinal-fields-not-working/#post-11465741)
 * Status: resolved