Handling conflicting submissions in different tabs

Created on 15 April 2019, about 5 years ago
Updated 8 April 2024, 3 months ago
  1. I created a webform with several steps.
  2. I then started the webform in one browser tab and submitted the first step.
  3. I opened the webform in another tab and it asked if I wanted to load a prior draft. I said yes.
  4. In tab 1 I made some selections on page 2 of the form.
  5. In tab 2 I made different selections on page 2 than in tab 1.
  6. I clicked submit in tab 1 and looked at the records in webform_submission_data.
  7. I clicked submit in tab 2 and noticed that the answers in webform_submission_data stayed the same.
  8. In tab 2 I got an error about some of the required fields on step 3 of the form

For what it's worth, I tried a similar situation with Amazon's checkout form to see how they handle this situation. I found that on the final "place my order" form that you can submit in 2 browser sessions with different options (2 different shipping options in my experiment) and Amazon will take 1 cart and turn it into 2 orders with 2 shipping choices.

Conclusions and thoughts:

I guess this means webform follows a "first submit wins" strategy to the problem, whether on purpose or not. Knowing that alone is useful to me :)

I'm not sure what the *right* thing to do is or whether it's webform's job to protect against this. Without considering the technical details, I can imagine that it would be nice if webform saw a submission of a step then it would check to see if that step had already been submitted for that page and somehow ask the user whether they want to keep the old data or use their new data. I guess that idea would be best if there were a way to see the old submission vs. the new submission (like a diff) which is obviously also a hard problem to solve.

✨ Feature request
Status

Closed: won't fix

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States greggles Denver, Colorado, USA

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.

  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    I think this is too complex to fix. If someone needs a webform submission locking feature, it should be done in a dedicated contributed module.

  • πŸ‡ΊπŸ‡ΈUnited States greggles Denver, Colorado, USA

    That seems OK to me. For what it's worth, the Webform Autosave β†’ module was built to try to address this problem using optimistic locking. That feature has required careful tuning over the years.

Production build 0.69.0 2024