Skip to content

Instantly share code, notes, and snippets.

@bavington
Last active November 23, 2017 12:56
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 bavington/97cdde74f28f1c86244de794a2f172e9 to your computer and use it in GitHub Desktop.
Save bavington/97cdde74f28f1c86244de794a2f172e9 to your computer and use it in GitHub Desktop.
Basic CF7 Event Handler (Test)
<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
alert( "DOM Event 'wpcf7mailsent' was heard on CF7 with the Form ID: " + event.detail.contactFormId);
}, false );
</script>
@bavington
Copy link
Author

The test Event Handler now alerts a successful detection with the respective Form ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment