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

Populate field based on result based on another field

New Here ,
Aug 07, 2023 Aug 07, 2023

Hi, 

We have a company form, there is a drop down list for office location in field a. Then based on which office location is selected in field a, we would liek field B to automatically populate with the manager of that office. 

Is this possible using Javascript in Adobe? 

Thanks 

i.e. Office Sydney populates with Troy 

Office Brisbane populates with Kate

TOPICS
PDF forms
149
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 ,
Aug 07, 2023 Aug 07, 2023
LATEST

As 'Validate' script of "Field A" (dropdown field) use this:

var B = this.getField("Field B");

if(event.value == "Location 1")
B.value = "Manager 1";

else if(event.value == "Location 2")
B.value = "Manager 2";

else if(event.value == "Location 3")
B.value = "Manager 3";

else
B.value = "";

Change "Field B" to your actual name of Field B and change "Locations" and "Managers" to your actual values.

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