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

Adobe Acrobat Pro DC Text Field Correspondence with Dropdown Lists. Scripts?

Community Beginner ,
Oct 20, 2023 Oct 20, 2023

I have six dropdown lists

- "Dropdown2"

- "Dropdown3"

- "Dropdown4"

- "Dropdown5"

- "Dropdown6"

- "Dropdown7"

I would like to know how to format a text field below the dropdowns so that the textbox reads "Pass" ONLY if "Yes" is selected in EACH of the six dropdown lists. If "Yes" is not selected in each of the six dropdown lists, the text field should read "Not Met"

TOPICS
Comment review and collaborate Experiment , Edit and convert PDFs , How to , JavaScript , Modern Acrobat
465
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 ,
Oct 23, 2023 Oct 23, 2023

You can use this code as the custom calculation script of the text field:

 

var result = "Pass";
for (var i=2; i<=7; i++) {
	if (this.getField("Dropdown"+i).valueAsString!="Yes") {
		result = "Not Met";
		break;
	}
}
event.value = result;
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 Beginner ,
Nov 03, 2023 Nov 03, 2023

This did not work

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 03, 2023 Nov 03, 2023
LATEST

You'll need to elaborate a bit if you want further help...

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