Dear @stefano.mazzi,
You can also try hiding the field, like this:
fd.field('FileLeafRef').hidden = true;
It can also be done dynamically, like this:
fd.spRendered(function() {
function hideOrShowName() {
if (fd.field('Status').value == 'Expired') {
// Hide the FileLeafRef field
fd.field('FileLeafRef').hidden = true;
} else {
// Show the FileLeafRef field
fd.field('FileLeafRef').hidden = false;
}
}
// Calling hideOrShowName when the Status value changes
fd.field('Status').$on('change',hideOrShowName);
// Calling hideOrShowName on form loading
hideOrShowName();
});
As for opening the form, where are the documents uploaded, directly in Document Library? Or via the List or Library control on a form? Some other way?
Hi @Nikita_Kurguzov
thank you for your reply.
I need even to disable the field FileLeafRef, but I tried your code and with the "hidden" no problem, if I need to "disable" it doesn't work.
Directly in document library with drag and drop, but I want to know if there is a way to disable drandrop and force to use only the form to load a new document.