PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

how to prevent multiple form submissions

  1. If the user is not patient enough and click the submit button of the gravity form multiple times two or more of the same entries will be created. Dave Landon posted the info below regarding this topic, but I don't know which file he refers to that I can put the code in. Anyone can help please?!!!!!!

    Hope this code helps people. Just put it in the <HEAD> section of the page that you wish to control the submit button…

    $(":submit").click(function(){
         $(this).attr('disabled', 'disabled').val('Please wait...');
    });
    Posted 12 years ago on Wednesday April 25, 2012 | Permalink
  2. The easiest place would put that script somewhere just before closing "head" tag in your theme's header.php file. You would need to wrap the the snippet with the appropriate script tags for it to work properly.

    [js]
    <script type='text/javascript'>
    $(":submit").click(function(){
      $(this).attr('disabled', 'disabled').val('Please wait...');
    });
    </script>

    http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F

    Oh, and when copying scripts from this site.. mouseover the script, click on the little icon and then copy the script from the popup window.. not directly from inside the post. That way you won't copy the line numbers as well which will end up breaking your script.

    screenshot: http://bit.ly/IQHjEG

    Posted 12 years ago on Wednesday April 25, 2012 | Permalink
  3. Thank you soooooooooooooooo much Kevin!!!
    It works!
    Mary

    Posted 12 years ago on Saturday April 28, 2012 | Permalink
  4. David Peralty

    Glad this worked for you.

    Posted 12 years ago on Sunday April 29, 2012 | Permalink

This topic has been resolved and has been closed to new replies.