Pragmatic Works Nerd News

Power Apps: Show Hide Fields in Forms and Disable Buttons [Power Platform Series - Ep. 17]

Written by Matt Peterson | Nov 01, 2026

Power Apps: How to Show or Hide Fields in Forms and Disable Buttons

In this episode of Pragmatic Works’ Power Platform Series, Matt Peterson walks through a practical Power Apps canvas app scenario that many app developers face: how to dynamically show or hide form fields based on user input, and how to disable a save button until required information is entered. Using a student wellness check app as his example, Matt demonstrates how these techniques can improve the user experience, guide data entry, and help ensure cleaner, more complete records.

 

Why Dynamic Forms Matter in Power Apps

Matt explains that in real-world Power Apps development, users often have different requirements depending on the situation. Some fields may only need to appear when a specific condition is met, while other actions—such as saving a record—should only be allowed once the user has entered key information. Rather than relying only on required columns in the data source, Power Apps developers can create a more user-friendly experience by enforcing these rules directly in the app interface.

In the example app, students complete a mental wellness check by rating feelings such as isolation or physical exhaustion. Guidance counselors and teachers wanted certain comment fields to appear only when those ratings passed a threshold. They also wanted to prevent users from saving incomplete records.

Setting Rating Controls to Start at Zero

Matt begins by addressing a common usability issue with rating controls. By default, the rating input in his form starts at three stars. He points out that when users see a default value already selected, they may skip the field without truly making a choice. To avoid that, he changes the default value from 3 to 0.

This simple adjustment helps encourage intentional input. When the control starts at zero stars, the user must actively select a rating rather than passively accepting a preset value.

Showing and Hiding Fields with Conditional Logic

Next, Matt demonstrates how to dynamically show a comments field only when the user selects a high enough rating. In his example, the “Isolation Comments” field should only appear if the user selects four or five stars for feeling isolated.

To do this, he selects the full data card for the comments field and updates its Visible property. Instead of leaving it set to true, he replaces it with an If statement that checks the value of the related rating control.

The logic works like this:

  • If the rating control value is greater than 3, show the comments field.
  • If the rating control value is 3 or below, hide the comments field.

Matt repeats the same process for another field tied to physical exhaustion, showing that this pattern can be reused across multiple data cards in a form. He also notes that developers could apply similar ideas through security roles, but in this example, the logic references the form controls directly.

Disabling the Save Button Until Required Values Are Entered

After handling field visibility, Matt shifts to another important requirement: preventing users from clicking the save button too early. He wants the save button to remain disabled until specific fields are filled out, even if those fields are not technically marked as required in the original data source.

To accomplish this, he updates the save button’s DisplayMode property. By default, a button uses DisplayMode.Edit, which means it is clickable. Matt replaces that with conditional logic:

  • If a required rating value is still zero, the button becomes DisplayMode.Disabled.
  • If a valid value has been selected, the button becomes DisplayMode.Edit.

He first applies this rule to one rating field, then expands it to include multiple controls. Using OR conditions, he checks whether any of the rating fields are still zero. If even one of them has not been completed, the save button stays disabled.

Checking for Blank Text Input

Matt then adds one more requirement: a general comments field must always contain text before the record can be saved. Since this is a text input rather than a numeric rating control, it requires a different type of condition.

For this field, he uses an IsBlank() check against the text property of the comments control. If the comments box is blank, the condition evaluates to true, and the save button remains disabled. Once the user types any character into the comments field, the button becomes active.

This is a useful technique because it allows developers to combine numeric checks and text checks within a single block of save-button logic.

Key Takeaways from Matt Peterson’s Demo

Matt’s walkthrough highlights several valuable Power Apps design strategies:

  1. Reduce accidental input by removing misleading default values from rating controls.
  2. Improve form usability by showing only the fields users need based on their selections.
  3. Enforce app-level requirements by disabling action buttons until the right data is entered.
  4. Use control properties directly in formulas to make forms more dynamic and responsive.

Final Thoughts

Matt Peterson shows that Power Apps forms do not need to be static. With a few conditional formulas, developers can build smarter, cleaner, and more user-friendly applications. Whether the goal is to simplify the form experience, reduce bad data entry, or enforce custom validation rules, these techniques offer a practical way to improve app quality.

For anyone building canvas apps, this episode serves as a strong example of how small interface changes can make a big difference in usability and data collection. It is also a reminder that Power Apps gives developers the flexibility to go beyond standard form behavior and create experiences tailored to real business needs.

 Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Apps and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.