Last active
May 16, 2018 07:41
-
-
Save aaronsummers/92a287303884d1d515e3bbf81a733991 to your computer and use it in GitHub Desktop.
Contact form 7 event listeners
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.addEventListener( 'wpcf7mailsent', function( event ) { | |
| location = '<?php echo site_url('/success/')?>'; | |
| }, false ); | |
| document.addEventListener( 'wpcf7submit', function( event ) {} | |
| /* | |
| List of Contact Form 7 Custom DOM Events | |
| wpcf7invalid — Fires when an Ajax form submission has completed successfully, but mail hasn’t been sent because there are fields with invalid input. | |
| wpcf7spam — Fires when an Ajax form submission has completed successfully, but mail hasn’t been sent because a possible spam activity has been detected. | |
| wpcf7mailsent — Fires when an Ajax form submission has completed successfully, and mail has been sent. | |
| wpcf7mailfailed — Fires when an Ajax form submission has completed successfully, but it has failed in sending mail. | |
| wpcf7submit — Fires when an Ajax form submission has completed successfully, regardless of other incidents. | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment