Skip to content

Instantly share code, notes, and snippets.

@andxbes
Last active September 10, 2017 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andxbes/a4e512801b4f899c32fd07746f859f88 to your computer and use it in GitHub Desktop.
Save andxbes/a4e512801b4f899c32fd07746f859f88 to your computer and use it in GitHub Desktop.
Example for new additionals settings
jQuery(document).ready(function ($) {
// cf-7 addition settings
document.addEventListener('wpcf7mailsent', function (event) {
switch (Number(event.detail.contactFormId)) {
//Your form id
case 22147 :
$("#AfterSendShow").show();
$("#AfterSendShow2").show();
$("#AfterSendShow3").show();
$("#AfterSendHide").hide();
$("#AfterSendHide2").hide();
$('#AfterSendHide3').hide();
break;
//Next form
case 22149 :
// some thing
break;
default :
console.info("This form haven't addition settings. Form id - " + event.detail.contactFormId );
}
}, false);
});
jQuery(document).ready(function ($) {
// cf-7 addition settings , for all forms
document.addEventListener('wpcf7mailsent', function (event) {
$("#AfterSendShow").show();
$("#AfterSendShow2").show();
$("#AfterSendShow3").show();
$("#AfterSendHide").hide();
$("#AfterSendHide2").hide();
$('#AfterSendHide3').hide();
}, false);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment