Radio button

Certified Senior Developer

hello,

I need to display 3 radio buttons in the UI. Based on the logged in user group need to allow users to select radio button options.

For Example

a)if the user from Group A logged in then user can select either option A or Option B.  Also  option C should be visible to the user but not allowed to select.

b)if the user from Group B logged in then user can select either option A or Option B.  Also  option C should be visible to the user but not allowed to select.

c)if the user from Group C logged in then user can select option C  Also  option A & B should be visible to the user but not allowed to select.

I tried to assign default value for the selected option & set disabled value to False and that works for option c.(option a and b is disabled)

But for other 2 buttons  I'm not sure how to allow the users to select 2 radio buttons out of 3( need to disable option C only-visible to the user but not allowed to select)

 

Please let me know If any one have different thoughts or implemented similar logic.

Thanks

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer
    Radio buttons offer no way to disable particular buttons in the list - it's either all enabled or all disabled. The best you might be able to do is make them all separate radio button components (label-less) and use a!saveInto() magics to prevent more than one at a time from being selected (this is a big workaround though and may end up kinda clunky).

    I think the Appian Best Practice™ way of doing this would be to have the standard selections, and implement validation messages for when the user selects an option they're not allowed to select.
Reply
  • +1
    Certified Lead Developer
    Radio buttons offer no way to disable particular buttons in the list - it's either all enabled or all disabled. The best you might be able to do is make them all separate radio button components (label-less) and use a!saveInto() magics to prevent more than one at a time from being selected (this is a big workaround though and may end up kinda clunky).

    I think the Appian Best Practice™ way of doing this would be to have the standard selections, and implement validation messages for when the user selects an option they're not allowed to select.
Children