Editing a submitted Submission sets it back to draft

Created on 21 May 2024, about 1 month ago
Updated 28 May 2024, about 1 month ago

Problem/Motivation

We have webforms configured:
Allow users to save multiple drafts
Automatically save as draft when paging, previewing, and when there are validation errors
When the user has a form opened into two tabs, submits in one and then saves on the other, sets the submission back to draft.

Steps to reproduce

Enable the following two settings:
Allow users to save multiple drafts
Automatically save as draft when paging, previewing, and when there are validation errors

Create a multipage webform that has a save button that saves draft and a submit.

Create one submission, fill page 1 and click next (the submission is saved as draft)
Duplicate the window or on another tab open the submission for editing.
Go back to your first window and complete and submit the form (in_draft = 0)
Go to your other tab and click save. The submission becomes draft again (in_draft=1)

Proposed resolution

To override we had alter the form and throw errors on submit and on save. We also had to patch webform module to prevent the ::autosave function triggered after the submit.
I understand that the case above is an edge case and for many probably correct behavior of webforms, but it would be nice if there was an option that when enabled would prevent the update of the webform_submissions table whenever the form is completed.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

6.2

Component

Code

Created by

🇬🇷Greece maggie_s

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

Comments & Activities

Production build 0.69.0 2024