Reset button didn´t hide my checkbox as default

Community Beginner ,
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

85

Likes

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

Reset button didn´t hide my checkbox as default

Community Beginner ,
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

86

Likes

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
Oct 13, 2018 0
Adobe Community Professional ,
Oct 13, 2018

Copy link to clipboard

Copied

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; 

Likes

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
Reply
Loading...
Oct 13, 2018 0