web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Disable changing and d...
Power Pages
Answered

Disable changing and deletion option for Form's File field

(0) ShareShare
ReportReport
Posted on by 111

Have set the File field to be read-only on the Form design:

jwnz_1-1670360668333.png

But the File field on the web page still allows to change and delete:

jwnz_2-1670360796758.png

How to disable change and delete options to make the File field read-only (still allow the user to click the file to download)?

 

Categories:
  • oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    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

  • jwnz Profile Picture
    111 on at

    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?

  • Verified answer
    oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    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:

     

    OliverRodrigues_0-1670491155227.png

    $(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
    };

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
Mohsin Ali Profile Picture

Mohsin Ali 49

#2
M Bilal Khan Profile Picture

M Bilal Khan 44

#3
sannavajjala87 Profile Picture

sannavajjala87 30 Super User 2026 Season 2

Last 30 days Overall leaderboard