timegrid icon indicating copy to clipboard operation
timegrid copied to clipboard

Prevent multiple form submissions for POST (save)

Open alariva opened this issue 9 years ago • 8 comments

Multiple form submissions (button clicks on slow connections) may generate duplicated records.

Example attached.

user/business/X/contact/create

screenshot from 2015-11-19 21 54 52

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

alariva avatar Nov 19 '15 20:11 alariva

Solution 13b9d3358da5acdbfdbcd149f0ad91250e043bfa still causes some problems upon submissions. Business registration submit button does not submit. Patch was removed.

alariva avatar Dec 03 '15 18:12 alariva

This still an issue?

rearley avatar Sep 03 '16 22:09 rearley

Unfortunately, it is. You can reproduce it by clicking many times a submit button on a form.

There exist some ways to workaround it with javascript, but I believe it needs some research. There should be a stardard way to get around with this.

alariva avatar Sep 04 '16 00:09 alariva

I will take a look at this. I had the same issue at work and was able to resolve it through Javascript.

rearley avatar Sep 04 '16 00:09 rearley

Glad to know! Thanks for jumping in.

You may use demo.timegrid.io to reproduce the issue, and I may provide another development environment if required. Just let me know! :)

alariva avatar Sep 04 '16 00:09 alariva

Thanks, I have a vagrant box spun up and will start playing around with the system.

rearley avatar Sep 04 '16 00:09 rearley

@alariva What were the issues with your solution? I've fixed this on another website. There I disabled the button after submit.

sahilsharma011 avatar Dec 17 '16 02:12 sahilsharma011

It looks like this patch made form submission to not work at all (sorry, I have no further details on this), but I agree with a working js approach as long as its easy to implement on most affected forms in a reusable way.

alariva avatar Dec 17 '16 03:12 alariva