Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Versari

    (@versari)

    RESOLVED.

    Just place this code in your footer:

    <script>
    (function($) {
    $(document).ajaxComplete(function() {
    setTimeout(
    function()
    {
    $('.wpcf7-mail-sent-ok').slideUp('slow');
    }, 2000);
    });
    })(jQuery);
    </script>

    Would recommend to use the on_sent_ok (only success message) or on_submit (also errors) feature of CF7 for this.

    Thread Starter Versari

    (@versari)

    My contact form is inside an easy fancybox Popup. I’d like to auto-close popup after X seconds.

    I put this code inside Additional Settings and it works
    on_sent_ok: "$.fancybox.close();"

    but how can I set the time/countdown?

    You could try something like this, similar to your slideUp solution (untested):
    on_sent_ok: "setTimeout(function(){ $.fancybox.close(); }, 2000);"

    Thread Starter Versari

    (@versari)

    It worked!! Thank you very much Ov4rfly!

    Thread Starter Versari

    (@versari)

    Do you think is there a way after clicking Submit to only show the success message and then popup disappears instead of all the fields + success message after them?

    Thread Starter Versari

    (@versari)

    I followed this tutorial and I found my solution:

    http://www.asapchange.com/hide-contact-form-7-after-successful-send/

    But if I retry to open the popup (with the contact form inside) nothing shows up… What can I do to fix it?

    Thanks in advance to everybody!

    [ No bumping please. ]

    1. The thread starter (you) should be able to control the resolved status at “About this Topic” on the right hand side when logged in.

    2. Your question Hide success message after X seconds is clearly resolved. If you have other questions, please open a new thread.

    on_sent_ok: "setTimeout(function(){ $.fancybox.close(); }, 2000);"

    This solution only seems to close the modal, not remove the success message after x-amount of seconds.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Hide success message after X seconds’ is closed to new replies.