polyfade on "[Plugin: Contact Form 7] Hide success message after X seconds"

ساخت وبلاگ

Hi everybody,
how can I make disappear the confirmation message after X seconds?

Thanks in advance!!!

https://wordpress.org/plugins/contact-form-7/

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.

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);"

It worked!! Thank you very much Ov4rfly!

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?

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.

polyfade
Member
Posted 13 minutes ago #

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.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 243 تاريخ : سه شنبه 18 خرداد 1395 ساعت: 8:00