Skip to content

File Upload on multi-page form #110

@james-dimmer

Description

@james-dimmer

When using a file upload on a multi-page form, the value of the file upload does not persist throughout navigation through the pages or submission. There is a further issue if the field is mandatory which is also explained in the section below.

Reproduction

Bug summary

We have created a form that has 2 pages, page 1 includes a file upload.

If you complete page 1 by uploading file A, then go to the next page, and then go back to the first page. We then experience an issue whereby file A is listed as a "Current file" yet with the file upload field being mandatory the user is prompted to upload another file.

After uploading another file (file B) to get past the validation on the file upload field, only file B is submitted with the form, and file A is completely lost.

Specifics

This happens when using Umbraco Forms 7.0.6 on Umbraco 7.12.3

Steps to reproduce

  1. Create a new form with 2 pages
  2. Add a mandatory short answer and a mandatory file upload to page 1
  3. Add a long answer to page 2
  4. View the form on the frontend, completing the first page with a short answer and an uploaded file (file A)
  5. Click through to the next page of the form
  6. Click previous to go back to the first page of the form
  7. File A which was uploaded from step 4 will be listed under current files
  8. When trying to click through to the next page of the form you are prompted to upload another file even though there is one listed as a "Current file"
  9. After uploading another file (file B) to get around the issue on point 8, when clicking through and submitting the form, file A is not submitted. Only file B is present when checking the form entries in the backoffice

Expected result

When going back to the first page the validation should be aware of the "Current files" and if there are any the validation should pass.

After uploading file B and submitting the form, for both file A and file B to be present when checking form entries in the backoffice.

Actual result

When going back to the first page the validation fails prompting the user to upload another file even if there is a "Current file"

As 2 files have now been uploaded and submitted to the form, they should both appear on this entry in the backoffice

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions