How to republish file upload field values

philtr 31 Jul, 2010
I've come accross a problem with a form with file uploads, when the form is submitted and the server side validation kicks in the form re-loads with all the fields republished barring the file upload fields which aren't republished, is there any way to republish these fields after the server side validation has taken place and returned an error?

I have set 'Republish fields if error occured' to try to republish. Can anybody help with this?
nml375 31 Jul, 2010
Hi,
There is no easy way to restore file attachments.
The security model of all browsers supporting file attachments prevents remote parties (such as the website serving the form) from selecting any files for attachments.

You could use some background uploader (flash uploaders) to upload the file independantly of the form processing, though you'll need some fancy coding to associate the uploaded file with the form instance, as well as supporting form reset, cancel/delete uploaded file, and so on..

/Fredrik
GreyHead 01 Aug, 2010
Hi philtr,

You can make this less painful by (a) adding front-side validation on the critical fields to reduce the server-side errors and/or (b) by making this a 2-step form with the key validation on the first step and the file upload on the second.

Bob
This topic is locked and no more replies can be posted.