Copy link to clipboard
Copied
Hi
I have a drop down box with 3 choices - Telephone/Writing/Not applicable
If telephone chosen I want "text8" field box to show
If Writing "test7" to show
if Not applicable chosen - I want neither box to show....
This below isn’t working - when I select "not applicable" I still get the “text 8”
box displaying (but not the “Text7” box) (I am brand new to this) – what is wrong
please!!
Thanks
if (event.value == "Not applicable")
{
this.getField("Text8").display
= display.hidden;
this.getField("Text7").display =
display.hidden;
}
else if (event.value == "Telephone")
{
this.getField("Text8").display =
display.visible;
this.getField("Text7").display =
display.hidden;
}
else if (event.value == "Writing")
{
this.getField("Text7").display =
display.visible;
this.getField("Text8").display =
display.hidden;
}
Copy link to clipboard
Copied
You need to use the exact field names. In your post, you used "Text7", "test7", and "text 8", "text8", and "Text8", so I suspect there's a typo in your code.
Copy link to clipboard
Copied
No typo in code just in my explanation! sorry
Copy link to clipboard
Copied
Check the JavaScript console by pressing Ctrl+J to see if any errors are reported.
Copy link to clipboard
Copied
Do I just press that when on the page?
Copy link to clipboard
Copied
I deleted it all then did it again.... now its working....It was exactly the same text - bizarre!!! anyway thanks!!!!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now