verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
96 stars 72 forks source link

File uploads disappearing when used inside repeater field on a multipage form #1448

Open seantimlin opened 1 year ago

seantimlin commented 1 year ago

Describe the bug

I have a multi-page form with the save button enabled. When I use the save button, the file uploads on the current page get saved correctly. However, the file uploads disappear when I submit to go next or back.

Steps to reproduce

  1. Create a multipage form
  2. Add repeater field with file upload child field
  3. Submit field to go next/back

Form settings

Craft CMS version

4.4.11

Plugin version

2.0.29

Multi-site?

No

Additional context

No response

engram-design commented 1 year ago

This would be the correct behaviour for file-page forms. This is because we can't populate a <input type="file"> with already-uploaded files. Which is why when navigating back a page in a form, you'll be shown the following:

image

When proceeding, the file won't be removed (it's already been uploaded), so there's no issue. Or, are you seeing something different on your end?

seantimlin commented 1 year ago

When I go back/next and then return to the page with the file upload field, it's empty. The incomplete submission in the CP has no files listed either. The repeater instances are saved, but the files are gone.

engram-design commented 1 year ago

Ah yes, I see what you mean now. That's quite strange behaviour, and from what I can tell, that seems to be coming from the parent Assets field (which we inherit from Craft). I'll investigate.

pwtStefanPeters commented 7 months ago

@engram-design I have this issue as well. I'm running formie v2.1.6. However, if I downgrade to v2.1.3 the problem disappears.

brycekirk commented 3 months ago

Would love a fix for this. I've got file uploads on one page and payment + submit on another. This bug makes that setup impossible.