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

How to populate different dropdown list based on selection of a value in another dropdown field?

New Here ,
Mar 17, 2021 Mar 17, 2021

Hi there,

I'm trying to create a fillable form in Acrobat Pro where I select a  value in dropdown field A, dropdown field B will only display a list of values pertaining to the value in A.

Thanks.

TOPICS
PDF forms
17.4K
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
1 ACCEPTED SOLUTION
Community Expert ,
Mar 18, 2021 Mar 18, 2021

Use setItems() to populate dropdown field, here is an example code:

if(event.value == "Item1")
this.getField("Dropdown2").setItems(["Item 1","Item 2","Item 3"]);
else if(event.value == "Item2")
this.getField("Dropdown2").setItems(["Item 4","Item 5","Item 6"]);
else this.getField("Dropdown2").clearItems();

You can also give items an export value like this:

setItems([["Item 1", "1"], ["Item 2", "2"], ["Item 3", "3"]]);

View solution in original post

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 ,
Nov 09, 2023 Nov 09, 2023

Use also a script at the Calendar dropdown.

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 ,
Nov 10, 2023 Nov 10, 2023

Sure, that's possible.

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