Copy link to clipboard
Copied
I'm trying to make it where if a dropdown of US states triggers a check box. I want 49 states to trigger this and only one (KY), to not trigger the text box. Is this possible?
Dropdown list name: TitleState
Check box name: OOS
Copy link to clipboard
Copied
Hi symone_1736,
Thank you for reaching out.
Please try the suggestion provided and correct the marked in the following community thread with a similar question: https://adobe.ly/4hR2xt5.
Hope that helps.
Thanks,
Meenakshi
Copy link to clipboard
Copied
That community post was also me. The difference here is that I need specific text to trigger the checkbox. I need 49 states to trigger the check box to be checked; I need 1 state to ensure that this checkbox remains unchecked.
Copy link to clipboard
Copied
In the other thread a regular expression was used to test for a an empty field value. You're current request isn't really all that different. It's just the test that needs to be adjusted. So you want the text "KY" to uncheck, and all other values to check.
Here's the code to put in the custom "Validate" script on the dropdown:
this.getField("OOS").checkThisBox(event.value != "KY",0);
Copy link to clipboard
Copied
Just a small mix-up! The 0 goes first in the function. So it should be:
this.getField("OOS").checkThisBox(0, event.value != "KY");
Copy link to clipboard
Copied
Thanks Nesa, I must the reference deprived today, 🙂
Find more inspiration, events, and resources on the new Adobe Community
Explore Now