Viewing 6 replies - 1 through 6 (of 6 total)
  • ciao @aodustin

    the issue you are experiencing is the non ajax mode, maybe caused by siteground-optimizer-assets.

    hope it helps!

    In addition check “siteground-optimizer-assets/agent-jquerycustom.min.js”.

    you need to remove (or fix) also this code:
    siteground-optimizer-assets/agent-jquerycustom.min.js

    jQuery(".wpcf7-form a,.wpcf7-form button").click(function(a) {
        jQuery(document).one("ajaxComplete", function(e, c, f) {
            var d = c.responseText, b = JSON.parse(d), a;
            if (!b.hasOwnProperty('into') || jQuery('.wpcf7' + b.into).length === 0)
                return;
            a = '<div class="cf7_popup">',
            b.status == "mail_sent" ? (a += '<div class="message1 sent_cf7"><h2 class="section_title">Thank You</h2><p>' + thank_msg_text + '</p></div>',
            a += '<div>') : (a += '<div class="message1 sent_cf7"><h2 class="section_title">SORRY</h2><p style="color:red;">' + b.message + '</p></div>',
            a += '<div>'),
            jQuery.fancybox.open(a, {
                smallBtn: !0,
                toolbar: !1
            })
        }),
        setTimeout(function() {
            jQuery.fancybox.close(),
            jQuery('#myModal').modal('hide')
        }, 5e3)
    }),
    Thread Starter Dustin Ryan

    (@aodustin)

    Hi Erik,

    I’m grateful that you responded.

    I’ve removed that CF7 Response in Popup Modal JS.

    But Still facing the same issue.

    I also tried this:

    document.addEventListener( ‘wpcf7submit’, function( event ) {
    event.preventDefault();
    }, false );

    – Nothing happend

    Hey Dustin (just now) tested and it seems to work! solved? what was the cause?

    Thread Starter Dustin Ryan

    (@aodustin)

    It’s not fixed actually Eric,

    I have downgraded Contact Form 7 version to 5.2

    So it’s working for me. However, I have to submit CF7 in its traditional way <input type=”submit” />

    I found that submitting the form by jQuery isn’t working after Contact Form 7 updated recently.

    And It’s my pleasure that you showed interest in my problem to get it fixed.

    Thank you ??

    if this is the cause, probably because you can’t get the submit event in that way.

    https://contactform7.com/2021/02/02/contact-form-7-54-beta/#overhaul-of-frontside-javascript
    https://contactform7.com/dom-events/

    • This reply was modified 3 years, 8 months ago by Erik.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Appending Form ID to URL’ is closed to new replies.