document.addEventListener( 'wpcf7submit', function( event ) { if ( '123' == event.detail.contactFormId ) { alert( "The contact form ID is 123." ); // do something productive } }, false );