1
0
-1

Lets say I have radio button group with values (a, b, c, d). If a checkbox has been selected, radio buttons (c, d)  should be grayed out. How do I do this?

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi LIra,

      Did you mean radio button or checkbox group? I don't think it can be done for radio buttons. But we only use those for when users are only allowed to make one selection.

      If they should be allowed to check more than one, we use checkboxes, usually wrapped in a mandatory block.

      Then you can just put an editability rule on buttons c and d.

      1. Lira Chantong

        Hi Lin,

        Radio button group as the user is only allowed to select 1 option. How about using dynamic class, is this possible?

        Thanks.

      2. Mark Murray

        Hi Lira,

        I haven't implemented this directly, so it's not tested. But I have used data driven components in different scenarios.

        You could use a data driven radio button group. When the checkbox is selected (on 'change' event) modify the data to show only a, b. If the checkbox is unchecked return the full data set - a, b, c, d.

        Hope that helps.

        Thanks

        Mark

      3. Lin VanOevelen

        Just a note on data driven checkbox groups: we discovered that the default component for this accepts 'false' (when checkbox is ticked and then unticked) as a valid value. So in that scenario, someone could pass the mandatory rule with all checkboxes effectively blank.

        To avoid this, you'll have to use some custom script.

      CommentAdd your comment...