File uploads disappear if required field is not completed

meanster99

Well-known member
Hi,

Is there any way to stop images from being cleared from the upload image fields when a required field is not completed?

When I upload images but then don’t complete one of the required fields (usually just because I, or the user, forgets), and click save record, the image uploads are cleared when the error message about not completing all required fields is shown, meaning the user has to reselect any image uploads (which can be a pain when you are uploading several images) before they can save the record.

Without removing required fields, is there anything that can be done about this?

Thanks,
Matt
 

eugenio

Administrator
Staff member
Hello Matt,
it is a known bug:
https://dadabik.com/index.php?function=show_documentation#bugs

"If an insert/edit form needs to be re-displayed because an error occurred (e.g. a missing required field), FILE fields (only file fields) don't preserve the values set by the user before submitting the form"

and it happens for any validation error of the form; at the moment there is no solution.

Best,
 
Top