How to add Contact Form 7 inside an Elementor Pro popup

In order to make Contact Form 7 and Conditional Fields for CF7 work inside elementor Pro popups, you need to add this code in your theme. If you don’t have a custom JS file, you can simply add this before the closing body tag in your footer.php file:

<script>
jQuery(document).on( 'elementor/popup/show', function() {
wpcf7.initForm(jQuery('.wpcf7-form'));
wpcf7cf.initForm(jQuery('.wpcf7-form'));
});
</script>

All this aside, I would not recommend using Contact Form 7 inside Elementor Pro popups. They just don’t play nice together. You should really just use the Form builder provided with Elementor Pro, or switch to another popup-solution.