cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Change Button Display Mode if any Form field change

Hi community,

 

please suggest how to achieve the below:

 

I have a form and when i choose to edit it , i want to set the Submit button's  display mode to Edit only if i change the value on any of the fileds it includes.

 

For example, if i change the date on any datepicker or text in textbox , only then the button's display mode will change from 

Disabled to Edit

 

Many thanks to all

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Hi @LTEVA ,

You need to set a Variable on the OnChange of the DatePicker and Text Box

UpdateContext({varChanged:true})

Then the DisplayMode of the Button

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

Also on your save and screen exit code

UpdateContext({varChanged:false})

 

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.

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Hi @LTEVA ,

You need to set a Variable on the OnChange of the DatePicker and Text Box

UpdateContext({varChanged:true})

Then the DisplayMode of the Button

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

Also on your save and screen exit code

UpdateContext({varChanged:false})

 

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.

View solution in original post

Highlighted

@WarrenBelz 

That's definetely a logic!!

Thank you

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,042)