Skip to main content
Participant
March 1, 2021
Answered

How to auto populate PDF dropdown list selection based on the selection of another dropdown list

  • March 1, 2021
  • 1 reply
  • 5676 views

I have three dropdown boxes (dropdown A, dropdown B, and dropdown C). How can I get the selection in one to pull information from another and populate in another? For example I have 20 name selections in dropdown A. I have two options in dropdown B which are "yes" or "no". And I have 15 name selctions in dropdown C.

This is what I'm trying to accomplish:

If a user selects "yes" from dropdown B, I would like it to automatically pull their name selection from dropdown A, and input it into dropdown C.  However, if the user selects "no" in dropdown B, they would be able to manually select from the 15 names in dropdown C. 

This topic has been closed for replies.
Correct answer try67

As the custom calculation script of dropdown C you can use the following code:

if (this.getField("B").valueAsString=="yes") event.value = this.getField("A").valueAsString;

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
March 1, 2021

As the custom calculation script of dropdown C you can use the following code:

if (this.getField("B").valueAsString=="yes") event.value = this.getField("A").valueAsString;

Known Participant
June 11, 2024

Hello TRY67!

 

Firstly thank you for all the help you give out! I was wondering if it is possible to have a drop down box with various different fields to select from. What i am trying to do is when an option from the drop down is selected. I would like to populate multiple text boxes with information for each different drop down selection. I would like different text to be filled from different options from the drop down box. To save keep filling the same text in every time. I hope this makes sense? If not i can try to explain clearer. 

 

Thank you! 

Known Participant
June 21, 2024
This is what i mean buddy. Something like this:
 
if (event.value=="CR") {
this.getField("Text1").value = "Weight";
this.getField("Text2").value = "DEF";
this.getField("Text3").value = "HIG";
} else if (event.value=="CR2") {
this.getField("Text1").value = "XYZ";
this.getField("Text2").value = "VVV";
this.getField("Text3").value = "ZZZ";
} else } else {event.value=="Option 3") {
this.getField("Text1").value = "";
this.getField("Text2").value = "";
this.getField("Text3").value = "";
}
 
i apologise for the silly questions i am new to coding. 

Sorry i figured the above question out. I am now wondering if i can also enable when i select an option from the drop down if it can also trigger a tix box to tick please?