Contact form 7 success or failure message show in popup

Add your popup code between if and else if condition

$(“.wpcf7-submit).click(function(event) {
$( document ).ajaxComplete(function() {
var result =$(“.wpcf7-response-output”).hasClass(“wpcf7-validation-errors”) ? “fail” : “success”;
if(result==’fail’){ // error popup code }else if(result==’success’){ // success popup code }
});
});

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s