jQuery.Deferred exception: $(...).fileUploadField is not a function TypeError: $(...).fileUploadField is not a function

Confluence User - 04 Jun, 2024

i have a problem  in my spreadsheet Plugin ! in edit mode i can only add files but when i click in remove and i save the form, the file removed come back and got this in console error : 

 jQuery.Deferred exception: $(...).fileUploadField is not a function TypeError: $(...).fileUploadField is not a function  

how to fix it please

spreadsheet;formgrid;forms;fileupload

2


04 Jun, 2024
confluenceUser
confluenceUser

Hi, 
A bit confuse here, in the question you mentioned spreadsheet, however, the image is showing subform repeater. 
Is the issue lies with the file upload used within subform repeater?

If the issue with subform repeater , maybe you can try check in the properties :

Enable all 
Add Mode, Edit Mode, Delete Mode


04 Jun, 2024
confluenceUser
confluenceUser

Hi,

I am developing the subform repeater to spreadsheet. However, the file upload feature isn't working. I can only add files, but when I try to delete a file, I click "remove" and it doesn't show. Then, when I save, it comes back with a jQuery.Deffered exeption !

i add that to my getrowTemplate 

if (mode.equals("Header")) {
Document doc = Jsoup.parse(html);
Elements head = doc.select("label");
String html2 = "";
for (int i = 0; i < head.size(); i++)
html2 += "<th>" + head.get(i).select("label").first().text() + "</th>\n";

LogUtil.info("--->IN edit mode HTML2", getPropertyString("readonly"));

if (!("true".equals(getPropertyString("readonly")))) {

html2 += "<th>Actions</th>\n";

}
// LogUtil.info("-->",html2);
return html2;
}

if (mode.equals("body")) {
Document doc = Jsoup.parse(html);
Elements divs = doc.select("div.subform-column").select("div.subform-cell");
String html2 = "<tr" + " class=\"" + cssClass + "\">" + "<div class =\"subform-container no-frame\">"
+ doc.select("input[type=hidden]");

html2 += "<td style = \"display:none\" class=\"subform_wrapper\">";
html2 += "<input type=\"hidden\" class=\"unique_value\" name=\"" + elementParamName
+ "_unique_value\" value=\"" + uniqueValue + "\" />";

String m;

for (int i = 0; i < divs.size(); i++) {

divs.get(i).select("label").remove();

divs.get(i).attributes().add("style", "display: flex;flex-direction: row;justify-content: center;align-content: center;");

m = this.validateMultiRow(divs.get(i).toString(), rowFormData.getPrimaryKeyValue());

if (m.isEmpty()) {

html2 += "<td><div>" + doc.select("div.subform-container").select("input[type=hidden]")
+ divs.get(i) + "<div></td>\n";

} else {

html2 += "<td><div>" + doc.select("div.subform-container").select("input[type=hidden]")
+ divs.get(i)
+ "<span class=\"form-error-message\" style=\"display: flex; justify-content: center;\">"
+ m + "</span>" + "</div></td>\n";

}

}

if (!("true".equals(getPropertyString("readonly")))) {
html2 += "<td class=\"repeater-action\">" + doc.select("a.repeater-action-delete")
+ "</td>\n </div></tr>";

}
return html2;
}

.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print