Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

mutually exclusive checkbox

Avatar

Former Community Member

I have two check boxes B1and B2. I’d like the boxes to be mutually exclusive so that if one box is checked the other is unchecked and both cannot be checked at the same time. Could anyone help?

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hello,

You can make two check boxes  to be mutually exclusive by writing the following code

in the click  event i.e.

for check box B1:-

if(this.rawValue == 1)
    {   
        B2.rawValue = 0;
    }

for check box B2:-

if(this.rawValue == 1)
     {   
         B1.rawValue = 0;

     }

Thanks,

Debadas.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

Hello,

You can make two check boxes  to be mutually exclusive by writing the following code

in the click  event i.e.

for check box B1:-

if(this.rawValue == 1)
    {   
        B2.rawValue = 0;
    }

for check box B2:-

if(this.rawValue == 1)
     {   
         B1.rawValue = 0;

     }

Thanks,

Debadas.