FileUpload in form resets form fields on upload
I have a form that contains a
FileUpload
field. It works fine, except when a user fills out the form, and then subsequently uploads a file, it resets the fields on the form to their defaults. So you have to remember to upload the file first, then set your form fields, then click save.
The file upload seems to be treated as its own form within a form or something, and I don't know how to tell it to just maybe do it all at once....is there a good work-around?
Here's my save method:
1 Reply
this shouldn't reset the fields. Did you add
$this->form->fill()
in the mount method? Are you using a statePath?
Console errors?
Try to share the whole code