In order to re-fill the file selection, you would have to know the file
path on the user's machine, but the browser does not send this information
due to security concerns, so you cannot maintain file selections across
page reloads. You would either have to submit (or at least validate) the
form via Ajax so you can keep the initial version of the form on the page,
or temporarily store the uploaded file on the server when there is an error
so the user doesn't have to upload it again on the re-submission. web2py
does not include built-in logic for either of these approaches, so you will
need some custom code.
On Sunday, September 18, 2016 at 10:37:59 AM UTC-4, Gael Princivalle wrote:
> Hello all.
> When a form is submitted with errors, if the user have choose first a file
> in this form, this choice is not reminded for the next submission attempt.
> Is there's a way to remind this choice?
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.