Skip to main content
Participant
September 20, 2023
Question

Seeking help with script to populate dropdown item from a different dropdown box.

  • September 20, 2023
  • 2 replies
  • 1021 views

Why do all items in "Bond_Mutual_Fund1" show regardless of the choices defined below?  Is there something in the Properties box that I am  missing?  Thanks for your input.

if(Bond_Company1.value == "Federated")
this.getField("Bond_Mutual_Fund1").setItems(["GNMA Trust 1","Interm Corp Bond 2","High Yield is"]);
else if(Bond_Company1.value == "Dodge and Cox")
this.getField("Bond_Mutual_Fund1").setItems(["Income"]);
else if(Bond_Company1.value == "Fidelity")
this.getField("Bond_Mutual_Fund1").setItems(["MICH Muni Income"]);
else if(Bond_Company1.value == "Lord Abbett")
this.getField("Bond_Mutual_Fund1").setItems(["Short Duration Income","Intermediate Tax-Free"]);
else if(Bond_Company1.value == "T.Rowe Price")
this.getField("Bond_Mutual_Fund1").setItems(["Short-Bond Fund","International Bond Fund"]);
else if(Bond_Company1.value == "Templeton")
this.getField("Bond_Mutual_Fund1").setItems(["Global Bond Advisor Cl"]);
else if(Bond_Company1.value == "Vanguard")
this.getField("Bond_Mutual_Fund1").setItems(["ST Inv Grade Bond Fund","Inflation Protected Securities","GNMA","Total Bond Market Admiral"]);
else
this.getField("Bond_Mutual_Fund1").clearItems();
This topic has been closed for replies.

2 replies

Bernd Alheit
Community Expert
Community Expert
September 21, 2023

Check the Javascript console for errors.

Participant
September 21, 2023

 

Bernd Alheit
Community Expert
Community Expert
September 22, 2023

This is not the JavaScript console. In Adobe Acrobat use ctrl-j or cmd-j

JR Boulay
Community Expert
Community Expert
September 20, 2023

What action triggers this script?
In which (type of) field?

Acrobate du PDF, InDesigner et Photoshopographe
Participant
September 21, 2023

The action is triggered by clicking on an item from a drop-down list.

JR Boulay
Community Expert
Community Expert
September 22, 2023

OK but what action in this dropdown?

MouseUp, onBlur, calculation, validation, format, …?

Can you share (part of) this PDF?

Acrobate du PDF, InDesigner et Photoshopographe