The common Attachment field is not supported in SharePoint 2019.
Data entered in Common fields is not saved to SharePoint directly. Common Attachments field saves files to Plumsail Account, and this functionality is not supported in SharePoint On-Premises version.
In your case, you can add a custom validation to the Attachments field to allow users to upload only certain file types:
fd.field('Attachments').validators.push({
name: 'Check Attachment',
error: "Error text attachments",
validate: function() {
var atchsAr = fd.field('Attachments').value;
let sum = 0;
for (i = 0; i < atchsAr.length; i++) {
var ext = atchsAr[i].extension;
if (ext != '.doc' && ext != '.docx' && ext != '.pdf') {
this.error = "Please upload a Word or a PDF document!"
return false;
}
return true;
}
}
});
Hi @mnikitina
EDIT: Sorry, now it works. Yesterday it mysteriously did not. Sorry - problem solved.
So, in plumsail forms application I see this field for use, but as you said, I cannot on On-prem.
Never mind, I wanted to also make people life easier with drag and drop with this field
Is it possible to do it with Sharepoint attachment field?
Thank you for the explanation.
Steve
I will bring this to the attention of the developers. And maybe we will remove the Attachment common field from the designer for SharePoint On-Premises.
The drag-and-drop functionality for SharePoint Attachments fields works both in SharePoint Online and On-premises.
I am experiencing the same problem. After searching for a while, I found that the attachment field only works outside a grid container. In a grid container, the upload window is not visible. I assume this is a bug? Outside a grid, this common upload field works without any problems.
Hi again,
My theory is not waterproof.
I had a form where the common attachment field was not fully visible. I then moved it out of the grid, saved the form and then back into the grid and it suddenly worked.
No explanation for but I think this attachment field is a bit bugy. I will continue with a library control instead.
The common Attachment field is not supported in SharePoint 2019.
Files uploaded to the common Attachment field are not saved to SharePoint. Common Attachments field saves files to Plumsail Account, and this functionality is not supported in SharePoint On-Premises version.
Use the SharePoint Attachments field or a List or Library control connected to a document library to collect files.