View Full Version : Form Element "Type: File" Problem
paputxi
10-09-2009, 04:45 PM
I created a form using FB. One of the fields is to be an optional field for attaching a document. However, even though I unchecked the Required check-box (it is checked by default) when I selected this form element, it still shows the red asterisk next to the field label. After I uploaded the form to my website to test it, it won't let me submit the form until I do attached a file. Therefore, it acts like it is a required field. Additionally and not surprisingly, there is no validation error message displayed either if I haven't attached a file. FYI, the validation does work properly for the fields where I do want this capability. It's just the file type where I have a problem.
BTW, I encounter the same problem even when I start with an empty page and add just this file type form element to the form.
Any advice on how to correct this situation would be greatly appreciated. Thanks in advance.
Jason Byrnes
10-09-2009, 05:38 PM
Hmmm, seams to be a bug that it adds validation to all file fields, I will log this in our bugbase.
To remove the validation, in the server behaviors panel, double clik the Server Validation server behavior.
In the list of validations, select the required validation that is applied to the file field and click the minus button. Then click OK.
paputxi
10-12-2009, 10:45 AM
Thanks for the workaround, Jason. However, I encountered another problem as noted below:
To test out your recommendation, I created just a simple form using FB where I had just a few form elements including one file form element. As expected, FB was forcing validation on the file form element. I was not requiring validation on any of the other elements.
I then went into the server behavior panel per your instructions and deleted the validation rule associated with the file form element (using the minus sign). I then clicked the Ok button to close the dialog window but I immediately got the following error message: "You must specify at least one Server Variable to validate". My only other option, from what I could tell, was for me to click Cancel and I am therefore unable to delete the validation rule on the file form element.
However, if I do make at least one of the other form elements requiring validation, I then have two validations rules and I can delete the one associated with the file form element. But then again, I now have required validation on a different form element where I don't want it either.
Not sure this is another bug or not, but thought I would pass this information on to you.
In any case, you can mark my original issue as RESOLVED BY WORKAROUND, sort of. Thanks.
Jason Byrnes
10-13-2009, 05:13 PM
Instead of removing the one validation from the Server Validations, you should remove the server validations server behavior in this case.
in the server behaviors list, select the server validation server behavior, then click the minus button to remove it.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.