Hi i would appreciate any help, I have set a contact form up and want it to show a button to download a file on submit. this is showing all the time and wont hide until the form is filled in.

I have entered the code: ( code in comment section )

but it is still showing on the page all the time can you please help me if im going wrong somewhere

Much appreciated



You can add listener on submit ..something like this:

  document.addEventListener( 'wpcf7submit', function( event ) 

{ if ( '123' == event.detail.contactFormId )    

  { alert( "The contact form ID is       123." ); //    do something productive } }, 

   false );
| improve this answer | |
  • Thank you for you quick reply this is the code i have already added to contact form 7 <div class="visible-only-if-sent"> <a href="demo.ogi.co.uk/download/1323" class="qbutton big_large_full_width center default">Download CVM10-Lite</a> </div> i am not very good at code so im not sure what you mean by what you have sent me Thanks Michael – Michael Purvis Dec 5 '18 at 16:18
  • Here is a link to the page demo.ogi.co.uk/cmv10 as you can see the button at the bottom of the page ' DOWNLOAD CMV10-LITE ' button is showing i want to hide this until the form is submitted, the code i have sent you was working on the old site just not on the new one. Any help is much appreciated – Michael Purvis Dec 5 '18 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.