cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rwittels
Helper II
Helper II

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
Helper II
Helper II

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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (68,467)