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 Apps / Edit Form - Prevent Us...
Power Apps
Unanswered

Edit Form - Prevent User from Editing specific field

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

In my current app, when they pull this screen up, it defaults to the current time of the user.

It has been decided that is great, but we now want to prevent the user from changing that time.

I am not seeing a place in properties where I can set editable to false or something like that.

How can we prevent users from changing the date and time?

 

lardo5150_0-1643311317701.png

 

lardo5150_1-1643311345564.png

 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @lardo5150 

    You can set the DisplayMode of the datacard to Disabled or View to avoid the user editing that field.

     

    I hope this is helpful for you.

  • lardo5150 Profile Picture
    Microsoft Employee on at

    YES!  I actually was just making that change (took me a minute to find it).

    Before I mark resovlved, @RandyHayes is it possible to do that but keep the box outlines?

    This format is just terrible lol

     

    lardo5150_0-1643314234014.png

     

  • lardo5150 Profile Picture
    Microsoft Employee on at

    Looks like you cant do that in displaymode.view, so I just went ahead and added a rectangle icon

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @lardo5150 

    Unfortunately, you cannot control the borders and fill when in View (that would be a nice property to have control over).  

    There are hack-tricks that can be done.  

    One is to actually place a transparent rectangle over the entire field.  That way, the user could not actually click on the underlying control as the rectangle will be blocking it.  So...they'd never get to edit it.

     

    It's a pure hack!

  • lardo5150 Profile Picture
    Microsoft Employee on at

    @RandyHayes  real quick, what is the best way to get the numbers to format to the RIGHT.

    When I have a double digit hour like 12, it lines up perfect.

    But single digits move over to the left, and it makes it look odd.

    Did a search and found the values I put in there, but that is not working.

    I want the number to be right next to the : , or at the very least indented to the RIGHT.

     

    lardo5150_0-1643316792659.png

     

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @lardo5150 

    You would be really better off using what is built into the forms.  That is, when you add your field to the form (and you can re-add that field to your form at this point and then delete the other customized one you have now) you can select the Control Type (once you unlock a card, you can no longer select the control type).  One of those control types is a View Text control type.

    If you choose that, it will format it nicely for you.  It will not have the rectangles around it, but you can then unlock the card and add them if you like.


    That will be MUCH easier than trying to go through all the formatting and changing in that field.

  • lardo5150 Profile Picture
    Microsoft Employee on at

    So for example, for the date/hour/time/AMPM labels, I have these formulas in the text for each corresponding label:

    Today()

    With({_hr:Hour(Now())}, If(_hr>12, _hr-12, _hr))

    Text(Minute(Now()), "00")

    With({_hr:Hour(Now())}, If(_hr>11 ||_hr=0, "PM", "AM"))

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard