Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
seantimlin opened this issue May 23, 2023 · 4 comments
Milestone

Comments

@seantimlin
Copy link

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

  • Multi-page form: Yes
  • Submission Method: Page Reload
  • Client-side Validation: Yes
  • Custom Form Templates: Yes

Craft CMS version

4.4.11

Plugin version

2.0.29

Multi-site?

No

Additional context

No response

@seantimlin seantimlin changed the title File uploads disappearing when used inside repeater field File uploads disappearing when used inside repeater field on a multipage form May 23, 2023
@engram-design
Copy link
Member

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
Copy link
Author

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
Copy link
Member

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.

@engram-design engram-design added this to the 2.2.0 milestone Dec 17, 2023
@pwtStefanPeters
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants