Have set the File field to be read-only on the Form design:
But the File field on the web page still allows to change and delete:
How to disable change and delete options to make the File field read-only (still allow the user to click the file to download)?
Are you making your customizations via Portal Management App or Portal Studio?
If using the Portal management app, you can open your form, navigate to Additional Settings and place the code in the Custom JavaScript area:
$(document).ready(function () {
SetFileColumnReadOnly("cr285_filecolumn");
});
function SetFileColumnReadOnly(columnName) {
$("#" + columnName).parent().remove(); // or .hide() if you want to control dynamically
$("#" + columnName + "_delete_button").parent().remove(); // or .hide() if you want to control dynamically
};
Hi @OliverRodrigues thanks for sending feedback to MS.
Initially I was thinking to add JavaScript code to hide these buttons, but couldn't figure out where to add the code, would you mind to show me where to edit the form's JavaScript code?
Hi, thanks for reporting this, I was able to reproduce and send this to Microsoft. I will let you know once I hear back from them.
It seems to be a bug, if you need this fixed urgently, I suggest adding JavaScript logic to remove the Browse/Delete button
Fubar
69
Super User 2025 Season 1
oliver.rodrigues
49
Most Valuable Professional
Jon Unzueta
43