Multiple Yes/No Radio Buttons to show/hide both fields and text label overlay(s)
After an inordinate amount of research here, I thought everything was working well until... (que ominous music)... I actually used it. Not terribly surprising to y'all but hey, I'm trying. 😉
Anyway, I have a number of different "Yes/No" radio buttons where, ideally, they will display/hide additional fields AND their respective text label overlays. While it "appeared" to work intially, I did not notice that the specific "Yes/No" radio buttons were turning all other overlays on or off irrespective of the varying overlay names. After attempting to research and tinker, I am now unable to get any of the overlays to turn on/off via JS only the fields leading me one again to the forum Subject Matter Experts (SMEs) offering advice and their expertise. So, once again, here I am.
In my attempt to employ the KISS principle and keep the JS as clean and neat as many of the examples provided here, I have clearly missed something -- or a whole lot of everything. My sincerest thanks in advance for your assistance.
Here is what populates the Actions, Run a JavaScript in one of the "Yes" boxes:
this.getField("Photos").display = display.visible;
this.getField("Diagrams").display = display.visible;
this.getOCGs("Photos&Diagrams").state = true;
Here is what populates the Actions, Run a JavaScript in it's paired "No" box:
this.getField("Photos").display = display.hidden;
this.getField("Diagrams").display = display.hidden;
this.getDataObject("Photos&Diagrams").state = false;
Here is what populates the Actions, Run a JavaScript in another of the "Yes" boxes:
this.getField("LogEntry_Deck").display = display.visible;
this.getField("LogEntry_Engine").display = display.visible;
this.getField("LogEntry_Official").display = display.visible;
this.getField("Incident_MTF").display = display.visible;
this.getDataObject("LogEntries").state = true;
Here is what populates the Actions, Run a JavaScript in it's paired "No" box:
this.getField("LogEntry_Deck").display = display.hidden;
this.getField("LogEntry_Engine").display = display.hidden;
this.getField("LogEntry_Official").display = display.hidden;
this.getField("Incident_MTF").display = display.hidden;
this.getDataObject("LogEntries").state = false;
