Jump to content

Stopping Multiple Clicks on Submit


newburcj

Recommended Posts

I have an email form on my website that allows a patron to make reservations to our community theatre shows using php and FormToGo. It works great but sometimes because of a slow connection, the patron will click 'Submit' and it seems like nothing happened. So they click again, and maybe again. In one case the data was submitted seven times.

 

Is there anyway I can disable the Submit button after it has been clicked once? This question has probably been answered before and I'd appreciate a point in the right direction.

 

Thanks in advance!

Link to comment
Share on other sites

Another way is to use sessions to remember the last time the user clicked.  Then only allow them to click once every 60 seconds (for example).  This is simple to implement and effective for most situations.

 

You do need to make sure the user can tell that the reservation was accepted though.  Perhaps send them to a list of their reservations if they have their click rejected due to repeats.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.