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 Apps / Disable form specific ...
Power Apps
Answered

Disable form specific form field if form mode is new

(0) ShareShare
ReportReport
Posted on by 321

 

 

 

If(
 EditForm1.Mode = FormMode.New,
 AssetLn.DisplayMode.Disabled,
 AssetLn.DisplayMode.Enabled
)

 

 

 

I want to disable some specific form field if my form mode is new

Categories:
  • Sickle-Cell Profile Picture
    600 Super User 2024 Season 1 on at

    Try this, just replace the TextInput with any element you want disabled.

     

    If(
     EditForm1.Mode = FormMode.New,
     TextInput1.DisplayMode.Disabled,
     TextInput1.DisplayMode.Enabled,
    )

     

  • Verified answer
    Sickle-Cell Profile Picture
    600 Super User 2024 Season 1 on at

    Actually, you could just use the following code in the DisplayMode of any element to disable.

    If(EditForm1.Mode= FormMode.New,
    DisplayMode.Edit,
    DisplayMode.Disabled)
  • codeworks Profile Picture
    321 on at

    This would have worked, but i am using modern control

  • codeworks Profile Picture
    321 on at

    Placing the disable before the edit works.. Thanks

    If(
     EditForm1.Mode = FormMode.New,
     DisplayMode.Disabled,
     DisplayMode.Edit
    )

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 Apps

#1
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard