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

Disable checkbox on button click

Hello,

 

I have 4 checkboxes and 1 button, it's a screen with test, so i don't want user to change his marks in any checkbox more than once. 

So how can I disable checkboxes after pressing a button?

 

I tried to write in a checkbox1 displaymode this: 

If(Button3_19.Pressed,DisplayMode.Disabled, DisplayMode.Edit)

But it disables checkbox only while I keep the button pressed. 😥

1 ACCEPTED SOLUTION

Accepted Solutions
eka24
Super User
Super User

OnCheck of the Checkbox, create a variable;
UpdateContext (DisabledCheck,true)

 

Or use a set variable;
Set(DisabledCheck,true)

 

Then in the Displaymode;
If(DisabledCheck,DisplayMode.Disabled, DisplayMode.Edit)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

2 REPLIES 2
eka24
Super User
Super User

OnCheck of the Checkbox, create a variable;
UpdateContext (DisabledCheck,true)

 

Or use a set variable;
Set(DisabledCheck,true)

 

Then in the Displaymode;
If(DisabledCheck,DisplayMode.Disabled, DisplayMode.Edit)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

@eka24 Thanks a lot, it works even better than I suggested 😊

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,329)