This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

How to prevent duplicate form submissions


  1. mjg234
    Member

    How can I prevent a user from hitting Submit multiple times and creating duplicate entries? I have created a form and the user must be hitting the back button and submitting it again or something because I sometimes get multiple submissions. One person submitted the same form 28 times in the space of about 3 minutes.

    I do not want to block the I address because I may want to allow them to submit a form again in the future. I just do not want multiple entries in a short period of time.

    Posted 10 years ago #
  2. aarenhofferth
    Member

    I've actually been getting this same problem on a multitude of our clien'ts sites. Not sure what the issue is, but it started happening a few days ago (clients are on different hosting accounts).

    If I look at the time stamps, there are up to about 15 submitted within the same minute. I think it's highly unlikely that a user would submit a form that many times (they'd probably get frustrated and leave after a couple tries), let alone fill it out that quickly. My guess is that there is something with the script or the server hanging up and trying to resubmit the form over and over again.

    Any ideas guys?

    Posted 10 years ago #
  3. aarenhofferth
    Member

    mjg -- Are you using a rackspace SMTP server by chance? Like secure.emailsrvr.com or smtp.emailsrvr.com?

    Posted 10 years ago #
  4. aarenhofferth
    Member

    After looking in the logs -- it appears to be a something to do with this:

    PHP Fatal error: Uncaught exception 'Swift_IoException' with message 'Connection to secure.emailsrvr.com:587 Timed Out' in /var/www/vhosts/site.com/httpdocs/form/lib/swift-mailer/classes/Swift/Transport/StreamBuffer.php:182, referer: http://www.site.com/customer-service/

    Posted 10 years ago #
  5. jblackburn
    Member

    We have this happen quite often as well. In our case, I think it just executes slowly, so people hit the button again to resubmit. There must be some way to have it only submit once!

    Posted 10 years ago #
  6. aarenhofferth
    Member

    Yeah -- I'd love an option to disable the submit button after it's clicked once.

    Posted 10 years ago #
  7. mjg234
    Member

    @aarenhofferth: Yes, I am using Rackspace SMTP server.

    Posted 10 years ago #
  8. aarenhofferth
    Member

    After a bunch of testing, the only real variable (other than Machform itself) was the SMTP relay, which was Rackspace. I dropped the SMTP relay entirely and tested it on a different host (Media Temple) and it's been working perfectly, so my guess is it's both Rackspace and Machform. Rackspaces SMTP relay may have been slow and took extra time to send, while the the user keeps clicking the submit button causing duplicate submissions -- you should be able to edit view.js in order to remedy that problem -- just contact support directly and they can send you the file.

    Posted 10 years ago #
  9. jpello
    Member

    We have had off and on issues with this and strongly believe that in most cases it directly corresponds to the internet connection/speed of the person submitting the form. We have a great connection from our server, and have hundreds of people filling out our forms a day from different ISP's, etc.

    Today we had someone who registered 15 times within a minute. I called her and she had kept hitting "Submit" over and over again because it wasn't instantly jumping to the next page. If they have a slow internet connection it may take 1 - 3 seconds to move to the "complete" page...

    What I wish is that they could have one of a couple things happen when submit is clicked:

    1. Have the submit button "grey" out so it can't be clicked again.

    2. Have some bright red text pop up above the submit button that says something like "Your submission is processing - please wait!" so they know it's being processed.

    Posted 10 years ago #
  10. octochops
    Member

    Have this same issue as well

    Posted 10 years ago #
  11. AMurray
    Pro Member

    There have been other recent posts about disabling the submit button once it has been submitted. Yuniar I think posted a fix for it (or at least he can send you the fix on request to contact@appnitro.com.) His solution will grey-out the button.

    Some related posts I found:

    http://www.appnitro.com/forums/topic/submit-once?replies=7#post-20152

    http://www.appnitro.com/forums/topic/double-click-of-submit-button-submits-form-twice?replies=2#post-16820

    Posted 10 years ago #
  12. yuniar

    We'll be releasing v4.2 this week and it will include the fix for this (by disabling submit button once being clicked)


    MachForm Founder

    Posted 10 years ago #

RSS feed for this topic

Reply