Filename in fileupload plugin disappears after some failed validation

F.schettino

Italian
I am not sure that I use right parameters in fileupload plugin.
Can someone help me?

The issue:
If a validation of some element fails, so the form is redisplayed with validation error, the filename is changed to blank.
NB: Validations concern other elements; there isn't a validation for fileupload plugin.

Parameters:
1.png2.png3.png4.png5.png
 
It sounds like the form is doing everything it is supposed to do. If any validation fails the form isn't submitted and the file isn't uploaded.

I don't see anything you can do about it except turn on Ajax validation so the user is made aware of the other invalid entry (or entries) on the form before they submit it.

Also, when working with some new, more complex element that you just added to a form - it always helps to temporarily disable (unpublish) the other elements until you get that new element working the way you expect it to work. Then you can re-publish the other elements and, if there is a problem - you go back to disabling them again and then turning them back on, one at a time, until you find the one that is not behaving well or causing a conflict with the new element. That way, when you look for support, you can provide a better indication of exactly where the conflict lies.
 
When you say "the filename is changed to blank.", do you mean in the case where you are uploading a new file?

If so, then this is expected behavior of HTML forms, not a Fabrik issue. It is done to prevent a malicious site from changing the upload file path, and grabbing files it shouldn't. If this didn't happen, and you were submitting a form to a malicious site, they could fail validation dleiberately, replace the upload file path with whatever they wanted, and hope you didn't notice.

As Bauer says, the usual way to avoid this is to use AJAX validation, so the form doesn't have to be submitted in order to validate.

If on the other hand you are talking about editing an existing form, which has a file already uploaded, and you are losing that after a validation, that would be a fabrik issue. Although I just tested, and that doesn't happen for me.

-- hugh
 
I'm sorry, Bauer , you did't understand what I meant; probably I was not enough clear.

Thank you cheesegrits for your answer; I didn't know this behavior of HTML forms.
I confirm you that I am talking about uploading a new file, not editing an existing form.

I will try AJAX validation, that I never used.
Is it a good idea use it in any Fabrik form? What are the disadvantages?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top