Help fixing a script to show multiple fields upon drop down selection
I have 9 icon fields which are all hidden. I have three drop-down menus, each with three selections (Worth mentioning, each is set to Commit value immediately).
The code I have written is based on examples I have found in other threads regarding similar issues.
My code, which produces nothing, only connects itself to three fields and is as follows:
if (event.value == "12 O'Clock")
{
this.getField("MCO - L").display = display.visible;
this.getField("MCO - L10").display = display.hidden;
this.getField("MCO - L2").display = display.hidden;
}
else if (event.value == "10 O'Clock")
{
this.getField("MCO - L").display = display.hidden;
this.getField("MCO - L2").display = display.hidden;
this.getField("MCO - L10").display = display.visible;
}
else if (event.value == "2 O'Clock")
{
this.getField("MCO - L").display = display.hidden;
this.getField("MCO - L10").display = display.hidden;
this.getField("MCO - L2").display = display.visible;
}
What I want to achieve is a code that shows two fields and keeps the rest hidden. For example purposes, refer to them as Icon1 & Text1.
