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 / Required fields when D...
Power Apps
Answered

Required fields when DisplayMode is disabled

(0) ShareShare
ReportReport
Posted on by 86

I searched around but couldn't find the right answer to my question. I'm trying to save a form that relies on a Toggle to change the DisplayMode, so that several fields are disabled when it's off. Some of those fields have Required set to true in Power Apps (but not in the SharePoint list the form is connected with).

 

I can save the form when those fields are toggled on and in edit mode, but not when they're disabled. I'd like to keep those fields as required when the form is in Edit mode, but not required when they're disabled by the toggle.

 

Form OnVisible:

 

UpdateContext({ChangeDisplayMode: DisplayMode.Edit})

 

 

Toggle OnChange:

 

UpdateContext({ChangeDisplayMode: DisplayMode.Edit})

 

 

Fields DisplayMode:

 

If(Toggle1.Value=true,DisplayMode.Edit,DisplayMode.Disabled)

 

 

Save button OnSelect:

 

SubmitForm(Form1);NewForm(Form1)

 

 

At the moment when I try to save the form (when those fields are disabled), I don't even get an 'Entry is required or has an incorrect value' error, it just does nothing. 

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    156,386 Most Valuable Professional on at

    Hi @user180618 ,

    Set the Required property of the relevant DataCards to 

    !Toggle1.Value

    This is a Boolean value, so you are setting the Required to the opposite. So if the toggle disables them, the Toggle value is true, therefore Required is false. The opposite is true when they are enabled with the toggle false and Required is true.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard