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 Reply
  • 0
    Certified Lead Developer
    in reply to rajats246
    Add if statements to your saveInto parameters. if(and(user is member of group __, contains(prohibited list, save!value)), {}, saveInto(variable, save!value) )

    In your case it starts to get a little more complicated, but you can fully flesh out the logic for one group and then build from there.

    One more point, if the option for group C is only option C, then it seems pointless to have an input. Do they have the option of either selecting option C or not selecting it? Because they won't be able to get rid of option C if they select it using a radio button. Once one of them is selected, thereafter one of the radio buttons will always be selected.
Children