Skip to main content
Known Participant
June 21, 2021
Answered

How to hide one checkbox in a group

  • June 21, 2021
  • 1 reply
  • 496 views

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 has been closed for replies.
Correct answer try67

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.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
June 21, 2021

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.

Known Participant
June 21, 2021

Thanks a lot, It works ! 

A huge massive thank you for your help.