Untitled

 avatar
unknown
plain_text
5 months ago
469 B
2
Indexable
function elementor_popup_cf7_fix() {
?>
<script type='text/javascript'>
jQuery(document).on('elementor/popup/show', (event, id) => {
    const popup = jQuery(`#elementor-popup-modal-${id}`);
    popup.find('.wpcf7-form:not(.elementor)').each((index, formElement) => {
        wpcf7.init(formElement);
        jQuery(formElement).addClass('elementor'); // Prevent duplicate initialisation
    });
});
</script>
<?php
}
add_action('wp_footer', 'elementor_popup_cf7_fix');
Editor is loading...
Leave a Comment