I have multiple dropdown menus, all have the same selection choices. All triggers the same visible/hidden presence event on the same objects.
All objects default presence state is invisible.
All Dropdown fields are all individually named.
example:
Dropdown 1
selection 1 --> if (this.rawValue == "1") {that2.presence = "visible";} else {that1.presence = "invisible";}
selection 2 --> if (this.rawValue == "2") {that2.presence = "visible";} else {that2.presence = "invisible";}
selection 3 --> if (this.rawValue == "3") {that3.presence = "visible";} else {that3.presence = "invisible";}
Dropdown 2
selection 1 --> if (this.rawValue == "1") {that2.presence = "visible";} else {that1.presence = "invisible";}
selection 2 --> if (this.rawValue == "2") {that2.presence = "visible";} else {that2.presence = "invisible";}
selection 3 --> if (this.rawValue == "3") {that3.presence = "visible";} else {that3.presence = "invisible";}
simple enough... however, after selecting a choice in Dropdown 1 and then another in Dropdown 2, the first value clears away/reverts back.
If I remove the 'else' condition, the values remains, but... I can't undo the selection result if a change is needed. It kind of fine, if the end users makes no mistakes in their selections, but how often that happens?
I have also tried:
that1.presence = xfa.event.newText === "1"? "visible":"invisible";
What's going on here? Help! It seems soooo simple, but why!
Thank you in advance!