Provide option to completely disallow users from submitting while a file is uploading

Created on 5 September 2023, about 1 year ago
Updated 24 November 2023, 12 months ago

Problem/Motivation

Currently if a user tries to submit while a file is uploading they see a prompt "File upload in progress. Uploaded file may be lost. Do you want to continue?". It does not always make sense to allow a user to submit a form even though a file upload is in progress.

Steps to reproduce

  1. Create a webform with a file upload field.
  2. Navigate to the form
  3. Start uploading a large file. If you're testing this locally you may need to throttle the upload speed to delay the upload enough to see the prompt.
  4. Attempt to submit while the file is still uploading
  5. You should see the prompt. Confirm that you want to submit anyway.
  6. You will either see an error due to the missing file or see a successful form submission but notice the file is missing if you navigate to the submission

Proposed resolution

Provide an option to change this behaviour so that instead of allowing the user to submit the form mid file upload they see an alert and are unable to submit.

Remaining tasks

I will attach a patch shortly.

User interface changes

There will be a new option at /admin/structure/webform/config/elements.

Data model changes

There will be a new option in the webform.settings default config file and schema.

Feature request
Status

Fixed

Version

6.1

Component

Code

Created by

🇨🇦Canada dylan donkersgoed London, Ontario

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

Comments & Activities

Production build 0.71.5 2024