cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LTEVA
Regular Visitor

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
WarrenBelz
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

3 REPLIES 3
WarrenBelz
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

@WarrenBelz 

That's definetely a logic!!

Thank you

 

 

Hi, 

thanks, great solution

I've tried it to disable a submit button for sharepoint list form after its clicked, but it disables it in the form for the entire list generally, and not on item level. Do you have a trick how to apply this to a specific item only?

 

Thanks in advance 🙂

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (15,610)