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

Notifications

Announcements

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:
I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,368 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,368 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 78 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 75

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard