Title: Conditional Fields Not Working
Last modified: August 14, 2020

---

# Conditional Fields Not Working

 *  Resolved [ProActive](https://wordpress.org/support/users/sholly2/)
 * (@sholly2)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/conditional-fields-not-working-10/)
 * As the title says, CF7 + conditional fields in a Webba Booking form are not working.
 * This issue has occurred twice previously, the first time it was resolved by adding
   this js code:
 *     ```
       function wbk_init_conditional_fields(){
           jQuery('.wpcf7-form').each(function(){
           wpcf7cf_forms.push(new Wpcf7cfForm(jQuery(this)));
       });
       }
       ```
   
 * The second time this code fixed it:
 *     ```
       function wbk_on_form_rendered( service ){
           wpcf7.initForm( jQuery( '#wbk-booking-form-container' ).find( '.wpcf7' ) );
           wpcf7cf.initForm( jQuery( '#wbk-booking-form-container' ).find( '.wpcf7' ) ); 
       }
       ```
   
 * Your assistance would be much appreciated…
 * WP 5.5
    PHP 7.4.9 Webba Booking 3.8.52 CF7 5.2.1 CF7 Conditional Fields 1.9.9

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

 *  Plugin Author [Webba Appointment Booking](https://wordpress.org/support/users/webba-agency/)
 * (@webba-agency)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/conditional-fields-not-working-10/#post-13257825)
 * Hi,
 * Please, post here the URL of page with the booking form, so I can check for this
   issue.
 *  Thread Starter [ProActive](https://wordpress.org/support/users/sholly2/)
 * (@sholly2)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/conditional-fields-not-working-10/#post-13259339)
 * The form can be found here [Arrange a Consultation](https://acmejoinery.com.au/arrange-a-consultation/)
 * FYI:
    The form works as expected in the Contact Form 7 tester as well as in a
   stand alone test page.
 *  Plugin Author [Webba Appointment Booking](https://wordpress.org/support/users/webba-agency/)
 * (@webba-agency)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/conditional-fields-not-working-10/#post-13259640)
 * Hi,
 * I was searching for the ‘wbk_on_form_rendered’ code on your page but did not 
   find it. Can you please point out where the code added?
 *  Plugin Author [Webba Appointment Booking](https://wordpress.org/support/users/webba-agency/)
 * (@webba-agency)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/conditional-fields-not-working-10/#post-13259773)
 * **UPDATE**
 * We are observing the same issue on our side.
 * **Temporary solution**: downgrade CF7 Conditional Fields to verion 1.5.5
 * We jaust sent a question to CF7 Conditional Fields support. You can tack it here:
   [https://wordpress.org/support/topic/initform-doent-work/](https://wordpress.org/support/topic/initform-doent-work/)
 *  Thread Starter [ProActive](https://wordpress.org/support/users/sholly2/)
 * (@sholly2)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/conditional-fields-not-working-10/#post-13259891)
 * Use of the inspector would have revealed to you the code is present in the script
   here: `https://acmejoinery.com.au/wp-content/themes/generatepress-child/js/cf7-
   webba.js`
 *  Thread Starter [ProActive](https://wordpress.org/support/users/sholly2/)
 * (@sholly2)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/conditional-fields-not-working-10/#post-13259910)
 * Huh version 1.5.5 was more than a year ago and 32 versions ago, one doubts if
   its advisable to downgrade so far backwards?
 *  Thread Starter [ProActive](https://wordpress.org/support/users/sholly2/)
 * (@sholly2)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/conditional-fields-not-working-10/#post-13260009)
 * I’ve done my own debugging and have succeeded in getting my form conditionals
   to work with the follow code:
 *     ```
       function wbk_on_form_rendered( service ){
           wpcf7.initForm( jQuery( '.wpcf7-form' ) );
           wpcf7cf.initForm( jQuery( '.wpcf7-form' ) ); 
       }
       ```
   
 *  Plugin Author [Webba Appointment Booking](https://wordpress.org/support/users/webba-agency/)
 * (@webba-agency)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/conditional-fields-not-working-10/#post-13261825)
 * Thank you for updating the topic.

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

The topic ‘Conditional Fields Not Working’ is closed to new replies.

 * ![](https://ps.w.org/webba-booking-lite/assets/icon-256x256.gif?rev=2966452)
 * [Advanced Booking & Appointment System - Webba Booking Calendar](https://wordpress.org/plugins/webba-booking-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/webba-booking-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/webba-booking-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/webba-booking-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/webba-booking-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/webba-booking-lite/reviews/)

## Tags

 * [Conditional Fields](https://wordpress.org/support/topic-tag/conditional-fields/)

 * 8 replies
 * 2 participants
 * Last reply from: [Webba Appointment Booking](https://wordpress.org/support/users/webba-agency/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/conditional-fields-not-working-10/#post-13261825)
 * Status: resolved