ContactForm7 – How to prevent user from double click on the submit button?

wordpress logoIf you are using ContactForm7 for your wordpress website, you might encounter a problem where user like to double click on the “Submit” button whenever they try to submit a form. If you are using the form to run a registration campaign, then this probably end up with many duplicate emails in your inbox. Fortunately, ContactForm7 did provide some programming hook for us to extends it’s capabilities.

ContactForm7 – Follow the steps below to prevent user from double click on “Submit” button:-


  • go to Appearance -> Theme Editor  -> click on functions.php
  • scroll down to the end of the page and add these line (before the ?> tag) and click on “Update File” button.

  • Now go to ContactForm7 module – click on left navigation ‘Contact’.
  • Click on your form to edit. Now add this line after your [submit] button and “Save” the form

  • You may now try to submit your form at the front end. When the form is successfully submitted it will show an alert “Thank you for your submission”

Share this with your friends:-

Leave a Reply