Skip to main content
Participant
August 8, 2023
Question

Populate field based on result based on another field

  • August 8, 2023
  • 1 reply
  • 178 views

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

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
August 8, 2023

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.