Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

How can I gray out a form field?

(0) ShareShare
ReportReport
Posted on by 190

I want to gray out a form field so the user cannot edit it.  I only want to ungray it if some conditions are true, then user can change the field.  I am able to lock a field, but I want to gray it out.  Thanks. 

  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 9,150 Super User 2024 Season 1 on at
    RE: How can I gray out a form field?

    Hello,

    You can make your field as "Gray out" or "Ready only" using 2 ways.

    1. JavaScript

    2. Business Rule

    If you want some basic conditions/checks then you can use the Business rule but there are some limitations with the Business rule like it will not do advanced condition checks, for that you can use the JavaScript.

    Also don't be confused between Read only and Locked Field.

    community.dynamics.com/.../read-only-vs-lock-field

    Thank you,

    Amit Katariya

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How can I gray out a form field?

    Hi bp3378,

    In the business rule, you can use 'Lock/Unlock' components to lock/unlock the field based on one condition:

    pastedimage1655868529663v2.png

    In the form,you can see a lock icon in front of the field label if the conditions are met:

     pastedimage1655868616766v3.png

    When you hover over the field, the field will be greyed out.

    pastedimage1655868764770v4.png

  • bp3378 Profile Picture
    bp3378 190 on at
    RE: How can I gray out a form field?

    that’s like locking the field right?   How can I lock it and gray out the field?

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,959 Super User 2024 Season 1 on at
    RE: How can I gray out a form field?

    Hi,

    You can use Business Rule to disable field on the form based on condition.

    docs.microsoft.com/.../create-business-rules-recommendations-apply-logic-form

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans