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

Reset button didn´t hide my checkbox as default

Community Beginner ,
Oct 13, 2018 Oct 13, 2018

Hi everyone.

I´ve got this problem that one of my check boxes didn't hide again after clicking on my reset button as it should do.

The code behind of it is this one:

this.getField("box").display = (this.getField("s").isBoxChecked(0)) || (this.getField("s+r").isBoxChecked(0)) ||

(this.getField("g").isBoxChecked(0)) || (this.getField("g+s").isBoxChecked(0)) ||

(this.getField("g+s+r").isBoxChecked(0)) || (this.getField("o").isBoxChecked(0)) ||

(this.getField("o+").isBoxChecked(0)) ? display.visible : display.hidden;

So it should just hide or show on the choice of the user. Can someone see what I'm doing wrong?

I'm sorry for my bad English.

TOPICS
Acrobat SDK and JavaScript
317
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
Community Expert ,
Oct 13, 2018 Oct 13, 2018
LATEST

Try this:

this.getField("box").display = (this.getField("s").isBoxChecked(0) || this.getField("s+r").isBoxChecked(0) || 

this.getField("g").isBoxChecked(0) || this.getField("g+s").isBoxChecked(0) || 

this.getField("g+s+r").isBoxChecked(0) || this.getField("o").isBoxChecked(0) || 

this.getField("o+").isBoxChecked(0)) ? display.visible : display.hidden; 

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