Skip to main content
Known Participant
Jun 21, 2021 2:15 PM UTC
Answered

How to hide one checkbox in a group

Hello there ! 

I am trying to do something which seems quite simple, but I can't manage to make it work. 

I have two independant sets of checkboxes and when one of the checkbox in the first set is checked, it makes one of the checkbox in the second set visible. 

 

Here is the script I have at the moment and which works, but hides all the second set of checkboxes : 

var nHide = (event.target.value=="CB1")?display.visible:display.hidden; 

this.getField("CB2").display = nHide; 

 

I am looking for a way to hide only one of the checkboxes in the second set (and unfortunately, I can not use separate names for the second set of checkboxes). 

 

Thank you for your help.  

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Jun 21, 2021 2:52 PM UTC

To do that you have to access the individual widget in the group, like this:

 

this.getField("CB2.0").display = nHide;

 

The number is the index number of that widget in the group, starting with zero.

2 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Jun 21, 2021 2:52 PM UTC

To do that you have to access the individual widget in the group, like this:

 

this.getField("CB2.0").display = nHide;

 

The number is the index number of that widget in the group, starting with zero.

Translate
Known Participant
Jun 21, 2021 3:19 PM UTC

Thanks a lot, It works ! 

A huge massive thank you for your help. 

Translate