Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

if dropdown says specific text, then checkbox is marked

Explorer ,
Nov 07, 2025 Nov 07, 2025

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

TOPICS
Edit and convert PDFs , PDF , PDF forms
54
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Nov 07, 2025 Nov 07, 2025

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

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 07, 2025 Nov 07, 2025

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2025 Nov 07, 2025

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);

  

 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2025 Nov 07, 2025

Just a small mix-up! The 0 goes first in the function. So it should be:
this.getField("OOS").checkThisBox(0, event.value != "KY");

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2025 Nov 07, 2025
LATEST

Thanks Nesa, I must the reference deprived today, 🙂  

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines