Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [contact-form-7 id="42" title="Test Form"]
- add_action( 'wp_footer', 'mycustom_wp_footer' );
- function mycustom_wp_footer() {
- ?>
- <script type="text/javascript">
- document.addEventListener( 'wpcf7mailsent', function( event ) {
- //ga( 'send', 'event', 'Contact Form', 'submit' );
- if ( '42' == event.detail.contactFormId ) { // Change 123 to the ID of the form
- jQuery('#modalSuccess').modal('show'); //this is the bootstrap modal popup id
- }
- }, false );
- </script>
- <?php
- }
Add Comment
Please, Sign In to add comment