Upload fields don't store new uploads properly when there are validation errors
Context: The Edit Entry screen with any required field and a file upload field. If the user selects a file and submits the form while a required field is empty, the update will fail (as expected). However, when the page reloads, the file upload input isn't cleared. That leads to confusion as the file isn't available anymore and must be uploaded again to be saved:
To reproduce:
Single File Upload Field:
This issue exists in 1.19.4
- Upload a file
- Enter an error in a field
- Save the form
- The file appears uploaded
- Submit the form again
- The file is no longer there
Multiple File Upload Field:
This issue does not exist in 1.19.4
- Upload file
- Enter an error in a field
- Save the form
- The file is no longer there
Links to examples:
Video: https://monosnap.com/direct/YbEjhxEoccpX2Kn7ePErSTEWBKreQX
Changes in Product fields are also not stored when there are validation errors.
Ran into this problem today. Seems like GravityView is moving the uploaded files from their temporary home to the GF upload directory before the validation is done, instead of after. So when validation fails, Gravity Forms expects them to still be in the temporary folder and can't find them.
Following this thread in hopes of a fix.
https://secure.helpscout.net/conversation/2155642907/47010
Still happening on GFs 2.7.2 and GV 2.17.1
https://secure.helpscout.net/conversation/1818398060/40265 https://secure.helpscout.net/conversation/1880675598/41208
FreeScout #75264.
https://support.gravitykit.com/conversation/75264?folder_id=1