0

function cform_function() {?>
   <script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
    if ( '12694' == event.detail.contactFormId ) {
  var url = 'https://WWWWW.com/wp-content/uploads/2021/06/bannerspecs2021.pdf';
  var link = document.createElement('a');
  link.href = url;
  link.download = 'bannerspecs2021.pdf';
  link.dispatchEvent(new MouseEvent('click'));
  }
});
</script>
<?php }
add_action( 'wp_footer', 'cform_function' );

Jagdish Sarma Asked question July 15, 2021
Add a Comment