Forums

When user gets upload error, all fields clear (how to stop?)

altoidboy 22 Apr, 2009
CF 3.0.

I have a file upload field in my form. If the user tries to upload a file larger than the max allowed, a red box appears saying, "Sorry, your upload file size exceeds the limit" which is great" -- however, it has cleared all fields from the form!

How do I stop this? This is crucial because this is a complex form that many users will fill out in its entirety, then get frustrated that everything's wiped out if they unknowingly exceed the limit.
GreyHead 23 Apr, 2009
Hi altoidboy,

Please set "Republish fields if wrong submission ?" to 'Try to republish' on the AntiSpam tab.

Bob
altoidboy 24 Apr, 2009
I just tried that, and it works in all except one case: if the file upload is given a file that is not one of the allowed types.

In other words, if a user fills out the form incorrectly (e.g. doesn't fill in a name, or other text field), ChronoForms does correctly give the error, and puts him back in the form, and doesn't lose his data.

However, if the user includes a file upload, and the file type is not one of the allowed file types, then it kicks him back to the form with the red error saying unallowed file type, but the form is now blank. (Yes, I realize that ChronoForms probably doesn't know the file type until it's fully uploaded, although I guess it could intercept it based on the upload file field content before attempting the upload.)

It's a bit of a problem in my situation because I'm doing a rather involved tech support form, and if the user goofs in this particular way, they lose a lot of meticulously entered data, and that reflects badly on the site and the company.
GreyHead 24 Apr, 2009
Hi altoidboy,

The file type error ought to republish - I'l check the code in the morning and see what the bug is.

Bob
Max_admin 27 Apr, 2009
Correct, this is a bug and was fixed in the coming release!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
altoidboy 28 Apr, 2009
Fantastic. Thanks Max and Bob!
This topic is locked and no more replies can be posted.