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

New Here ,
Mar 17, 2021 Mar 17, 2021

Copy link to clipboard

Copied

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

Views

114

Likes

translate

Translate

Translate

Report

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
Adobe Community Professional ,
Mar 18, 2021 Mar 18, 2021

Copy link to clipboard

Copied

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"]]);

Likes

translate

Translate

Translate

Report

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
New Here ,
Mar 25, 2021 Mar 25, 2021

Copy link to clipboard

Copied

Thanks Nesa!  It worked.

Likes

translate

Translate

Translate

Report

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