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

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

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

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 (57,565)