Skip to main content
Participant
July 22, 2025
Question

Voneinander abhängige Dropdown-Felder bei pdf-Formular

  • July 22, 2025
  • 1 reply
  • 392 views

Liebe Community, ich möchte abhängige Dropdown-Felder erzeugen. Im ersten Feld gibt es die Kategorien 1-9. Je nach dem was man auswählt gibt es im zweiten Dropdown-Feld unterschiedliche Dropdown-Menüs. Kann man das über Javascript realisieren?
Also Kategorie 1 im Feld 1 bedingt die Auswahlliste A
Kategorie 2 im Feld 1 bedingt die Auswahlliste B usw. 

Danke für eure Hilfe!

1 reply

PDF Automation Station
Community Expert
Community Expert
July 22, 2025

1)  In the dependent dropdown, select "Commit selected values immediately" in the option tab.

2)  Enter the following custom validation script:

var fld=this.getField("Other Dropdown");
if(event.value=="Item 1")
{fld.setItems(["A1","B1","C1"])}
else if (event.value=="Item 2")
{fld.setItems(["A2","B2","C2"])}
else if (event.value=="Item 3")
{fld.setItems(["A3","B3","C3"])}
else
{fld.setItems([""])}
Participant
July 23, 2025

Thank you very much for your help. Unfortunately it does not work. (But I am shure it's fault of the user ;-))  In the first line I have to write the name of dropdown field 1 (Other Dropdown). Do I have to choose any other specification for the first field?

Participant
July 23, 2025

I know it was my fault 😉 I just choose the wrong field. Thank you for the script!