1

I just installed this plugin and I must say it does everything I need.

I am using a custom made popup div with a CF7 inside it.

I need to hide response messages (error, success message) after 5 seconds. Is that possible?

2 Answers 2

2

you can use below code to hide message

// Contact Form 7 submit event fire
document.addEventListener('wpcf7submit', function(event) {
  setTimeout(function() {
        jQuery('form.wpcf7-form').removeClass('sent');
        jQuery('form.wpcf7-form').removeClass('failed');
        jQuery('form.wpcf7-form').addClass('init');
  }, 1000);

}, false);
0

I would like to use css than:

.wpcf7-form.sent .wpcf7-response-output {
  animation: hideresp 5s forwards; 
  animation-iteration-count: 1;
}

@keyframes hideresp {
  90% { opacity:1; }
  100% { opacity:0; }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.