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

Reset button didn´t hide my checkbox as default

Community Beginner ,
Oct 13, 2018 Oct 13, 2018

Copy link to clipboard

Copied

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

Views

246

Translate

Translate

Report

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

Copy link to clipboard

Copied

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; 

Votes

Translate

Translate

Report

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