as I can to know if a "File Upload" contains a file, is for an if statement in javascirpt
Question
Question
Replies
Hi Esteban,
I'm not sure I understand exactly what's going on here but if you wanted to get the total number of files attached to a form you can use this jQuery to return the result as an integer.
$('A.ellipsis').length
This is counts each instance a link has been provided to a file by Laserfiche Forms which is uniquely assigned the class ellipsis. So if a user attaches 3 files to field #q1, and 2 files to field #q2 then it will return a value of 5.
If you want to validate that a file has been attached to a specific field, use this method:
$('#q3 > div > div > table > tbody > tr > td > a.ellipsis').length;
This will return the number of files attached to the Upload File field with the ID Q3. Add this in for each of your ID fields and then compare the results to know if a file has been provided for each field.
yes, it should add an element. I cannot remember at this time what it looks like but if you add a file and inspect the code you should find what you are looking for.