Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
12

Two separate check boxes affecting the same fields

Participant ,
Aug 16, 2023 Aug 16, 2023

Hi all,

I have 2 check boxes 1-Group8.c0 and 1-Group8.cf each with 5 further check boxes.  If the boxes (.c0 & .cf) are checked the relating 5 check boxes should be hidden, if left unchecked the relating 5 check boxes should remain visible for use.

 

Screenshot 2023-08-16 124728.jpg

I have the following code in the mouse up event of each check box

In Group8.c0

if (this.getField("Group8.c0").isBoxChecked(0))
{this.getField("Group8a").display = display.hidden;}
else
{this.getField("Group8a").display = display.visible;}

 

In Group8.cf

if (this.getField("Group8.cf").isBoxChecked(0))
{this.getField("Group8b").display = display.hidden;}
else
{this.getField("Group8b").display = display.visible;}

 

When checking Group8.c0 the fields named Groupa become hidden, however if i then check Group8.cf, Groupb become hidden and Groupa become visible.

 

Could someone please shed some light as to what i have done incorrectly

TOPICS
JavaScript , PDF forms
92
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation