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

 

View solution in original post

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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,667)