[eluser]megabyte[/eluser]
I have always wondered what would piss off a client the least when it comes to forms.
Let's say you have an admin are with a form that has 10 fields, 5 required fields and a file upload.
Now the client some how misses 1 of the required fields, so the form validation returns an error and now the file has to be selected once again.
This isn't too much of a big deal if the file is required, however if the file is not required and an error is returned because they missed a required field, then they won't get an error when they resubmit the form and forget to choose a file.
Then they don't realize they didn't reselect the new file, and start sending nasty emails saying there is an issue with the admin area and some files were not updated correctly.
Now I haven't had anyone complain yet, but I'd like to know I remove as much frustration as possible.
What is a person to do?
I tried placing the file upload inside a callback function, and this worked. This way the file is uploaded no matter what. Problem is I am having troubles figuring out how to store this temp image name. I tried using a hidden field, but the question is, how do you pass the value back to the form, and populate the hidden field before the form is validated?
Any ideas or solutions welcome.