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 / Update Submit Button D...
Power Apps
Unanswered

Update Submit Button DisplayMode Based on Changes in Edit Form

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2

I have an Edit form (Form1).

I have a Submit button with 'SubmitForm(Form1)' in OnSelect.

Is there a way to set the Submit button DisplayMode default to 'Disabled' until any text is changed in any field in Form1?

No changes, individual can click out of screen elsewhere.

If a change is made in any field or to any control in Form1 the Submit button changes to 'Edit'?

Categories:
I have the same question (0)
  • AhmedSalih Profile Picture
    6,678 Moderator on at

    @Phineas, use If(Form.Valid && Form.Unsaved, Edit,Disabled) in the Button DisplaMode

     

     

    Regards,
    Ahmed
    If my reply helped you, please give a 👍. And if it has solved your issue, please consider Accepting it as the Solution to help other members of the community find it more.

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    No changes made to the test data and Submit button is in 'Edit'.

    This is not the desired outcome.

    Goal: On new screen/screen open the Submit button should be 'Disabled'.

    Once any changes are made to the default data in the edit form the Submit button should change to 'Edit'.

    Phineas_0-1656889893412.png

     

  • AhmedSalih Profile Picture
    6,678 Moderator on at

    @Phineas , in your app settings, make sure to enable Formula-Level error Managment:

    AhmedSalih_0-1656890421728.png

     

    Also, is your form in an edit mode?

     

     

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Toggle is on.

    Form1 is in 'Edit'.

    If I add and exclamation the button is 'Disabled'. However, changes to the form content do not change the button to 'Edit' as desired.

         If(!Form1.Valid && Form1.Unsaved, Edit,Disabled)

  • AhmedSalih Profile Picture
    6,678 Moderator on at

    @Phineas , I think your issue is one or more of your form's fields has a default value that is using a lookup. When we use a LookUp to retrieve the default value of the field, the lookup will run when the form is visible and that will be considered as a change. 

  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @Phineas ,

     

    Please try below approach:

    1. OnVisible of the Screen set a variable:

    UpdateContext({Mode: true})

    2. OnChange of all the input controls such as Text inputs and combo box in the form:

    If(Not(Self.Text = Parent.Default), UpdateContext({Mode: false}, UpdateContext({Mode: true})

    3. DisplayMode of submit button:

    If(Mode, DisplayMode.Disabled, DisplayMode.Edit)

     

    However, please note that if user changes some fields then change a part of them back to default, this may not work properly.

     

    Hope this helps.

     

    Best regards,

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 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard