cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rwittels
Resolver I
Resolver I

Disable Radio OnSelect

Hi. I am going nuts trying to get this working. I have a Radio button control. When the user selects a value I want the Radio to disable so that their first choice is the only choice they can make. My Radio OnSelect code looks like this:

 

Q1_Radio.DisplayMode.Disabled;
If(Q1_Radio.Selected.Value = "Correct Answer",Set(Score, 100),Set(Score, 0))

 

The score works fine. It just doesn't disable the radio buttons. What am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @rwittels instead of Q1_Radio... Assign the status to a variable and set the radio display mode to the variable

UpdateContext({rbMode:DisplayMode.Disabled}) and set the display mode of the radio button to rbMode

rubin_boer_0-1613940427790.png

 

hope it helps

 

View solution in original post

3 REPLIES 3
rubin_boer
Super User
Super User

hi @rwittels instead of Q1_Radio... Assign the status to a variable and set the radio display mode to the variable

UpdateContext({rbMode:DisplayMode.Disabled}) and set the display mode of the radio button to rbMode

rubin_boer_0-1613940427790.png

 

hope it helps

 
rwittels
Resolver I
Resolver I

I removed

Q1_Radio.DisplayMode.Disabled;

from the OnSelect Property and placed this code in the DisplayMode Property and it works but now my score doesn't work:

If(!IsBlank(Q1_Radio.Selected.Value),DisplayMode.Disabled,DisplayMode.Edit)

Any idea why my OnSelect doesn't work now? Is it disabling before getting the score?

Thank you. Works perfectly.

Helpful resources

Announcements
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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (4,246)