Conditional fields not working in Elementor popup

[ad_1]

Hi, that’s because the popup is loading the content dynamically. So the form needs to be initialised manually after opening the popup. You can do this with this code:

<script>
  jQuery(document).on( 'elementor/popup/show', function() {
    const $form = jQuery('.wpcf7-form');
    wpcf7.init($form[0]);
    wpcf7cf.initForm($form);
  });
</script>

More information here: https://conditional-fields-cf7.bdwm.be/docs/troubleshooting/does-not-work-with-a-third-party-theme-or-plugin/#5

Thread Starter
mbri

(@mbri)

Hi thanks for your prompt reply, I have added the snippet in the footer and it is working now.

Cheers

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer