Skip to main content
Participating Frequently
October 13, 2018
Question

Reset button didn´t hide my checkbox as default

  • October 13, 2018
  • 1 reply
  • 366 views

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.

This topic has been closed for replies.

1 reply

Bernd Alheit
Community Expert
Community Expert
October 13, 2018

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;