Double click prevention on form submission

Created on 30 July 2012, over 12 years ago
Updated 21 July 2023, over 1 year ago

Updated: Comment #7

Problem/Motivation

Why is there no double click prevention built into Drupal core? Surely this should be standard functionality?

D7: the current patch (form.js) only works on forms using fieldsets or vertial tabs according to @JvE in #99

Steps to reproduce

  1. Use Chrome
  2. Navigate to admin/modules
  3. Scroll down
  4. Triple click the 'Save configuration' button
  5. Check the network page chrome provides which has 3 POST request.
  6. Apply the patch
  7. The network page does now contain just one POST request
  1. Use Chrome
  2. Log out
  3. Navigate to user/register
  4. Enter a user name and mail address
  5. Triple click the submit button
  6. Depending on your speed you get
    • Exception
    • Already taken

Proposed resolution

Integrate https://github.com/sun/jquery-form-submit-single

Remaining tasks

User interface changes

API changes

Related Issues

#494096: Using Chrome ConfirmForms do not double click prevention causing problems β†’
#881494: Double-clicking the "Install Drupal" button completely breaks everything β†’
#483876: Disable install button once clicked β†’

Original report by @ltwinner β†’

I'm working on a site for someone and they complained that if they double click quickly on the node save form two nodes get created. I was surprised at this and checked it myself and found it was true.

Why is there no double click prevention built into Drupal core? Surely this should be standard functionality? Lots of sites have this, I know vBulletin has it anyway from looking at their source code and you can see it yourself if you double click fast on a vBulletin forum's submit new post button.

So has this feature been overlooked for Drupal or is it left out by design?

πŸ› Bug report
Status

Fixed

Version

7.0 ⚰️

Component
FormΒ  β†’

Last updated 3 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom ltwinner

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024