(Note I have three type=“file” input lines all with name=“file”)
If formit happens to find errors in the other form input fields at validation, it does not appear to remember the values of the input fields with type=“file”. They are empty again. Why?
How do I make formit remember that value so that the user does not have to select that same file from his computer again?
I always suggest putting a validation layer in your front end using javascript in addition to back end validation. It just provides a better UX if nothing else with instant feedback if the form has been completed correctly.
I believe that’s a security limitation; it’s not possible to set the value for a file input because if you could, you could potentially upload arbitrary files from the user. That’s not possible to set from JavaScript either.