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

Acrobat Pro DC Dependent Dropdowns

New Here ,
Sep 19, 2021 Sep 19, 2021

Copy link to clipboard

Copied

I have 2 dropdown lists on my pdf form named, "Category" and "Items".  I need to make the "Items" List dependent on the "Category" List. The "Category" List items are "Fruits", "Veggies", "Other".  If you select "Fruits", then the "Items" list would contain a list of fruits.  If you select "Veggies", then the "Items" list would contain a list of vegetables, etc.

 

I understand that I need a Javascript to make this happen, but alas, I do not know how.

 

Your help is appreciated.

TOPICS
How to , JavaScript , PDF forms

Views

10.0K

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

correct answers 2 Correct answers

Community Expert , Sep 19, 2021 Sep 19, 2021

In this link PDF Form JavaScripts Dependent Dropdown Menus the video shows how to create dependent dropdown menus using vegetables and fruits as an example.

 

There are different ways you can achieve the same results with JavaScript scripting,  and I've seen this answeered before many times in these support forums and outside these forums.

 

See another useful way published by ACP Joel Geraci in this other link: Acrobat Javascript: Change list values based on another list 

 

See these othe

...

Votes

Translate

Translate
Community Expert , Sep 20, 2021 Sep 20, 2021

In "Category" field->properties->options tab tick 'Commit selected value immediately', use script in "Category" field as validation:

var f = this.getField("Items");
switch(event.value){
case "Fruits":
f.setItems(["Banana","Apple","Lemon","Orange"]);
break;
case "Veggies":
f.setItems(["Tomato","Cabbage"]);
break;
case "Other":
f.clearItems();}

"Other" choice will clear items from "Items" field, if you want something else under "Other" choice let me know.

Votes

Translate

Translate
Community Expert ,
Sep 19, 2021 Sep 19, 2021

Copy link to clipboard

Copied

In this link PDF Form JavaScripts Dependent Dropdown Menus the video shows how to create dependent dropdown menus using vegetables and fruits as an example.

 

There are different ways you can achieve the same results with JavaScript scripting,  and I've seen this answeered before many times in these support forums and outside these forums.

 

See another useful way published by ACP Joel Geraci in this other link: Acrobat Javascript: Change list values based on another list 

 

See these other discussions:

 

 

 

You may also want to dig more in these tutorials from ACP Thom Parker:

 

 

 

Votes

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
Community Expert ,
Sep 20, 2021 Sep 20, 2021

Copy link to clipboard

Copied

If you're interested, I've developed a (paid-for) tool that allow you to set it up easily and quickly, without having to write any code. You can find it here: https://www.try67.com/tool/acrobat-create-dependent-dropdowns

 

Votes

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
Community Expert ,
Sep 20, 2021 Sep 20, 2021

Copy link to clipboard

Copied

In "Category" field->properties->options tab tick 'Commit selected value immediately', use script in "Category" field as validation:

var f = this.getField("Items");
switch(event.value){
case "Fruits":
f.setItems(["Banana","Apple","Lemon","Orange"]);
break;
case "Veggies":
f.setItems(["Tomato","Cabbage"]);
break;
case "Other":
f.clearItems();}

"Other" choice will clear items from "Items" field, if you want something else under "Other" choice let me know.

Votes

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
Community Beginner ,
Jul 10, 2023 Jul 10, 2023

Copy link to clipboard

Copied

I am also using the same "fruits and vegetables" example. I have a pdf form that will have 8 "product" dropdowns which then are supposed to select the data into each corresponding "locations" dropdown. The code works on the 1st product dropdown but not on the rest. I've searched and searched for an answer but I can't figure out what's wrong.

 

Here is the code in the custom validation box for the product dropdown. I changed the var f to match each location dropdown name. Any help is greatly appreciated as I've spent quite a long time trying to figure this out.

 

var f = this.getField("Locations_1");

if(event.willCommit)
{
switch(event.value){

case "BUTANE":
f.setItems(["Select Butane",
"(B) DCP GREELEY/DCP LUCERNE",
"(B) DCP GREELEY/DCP O'CONNOR",
"(B) DCP GREELEY/DCP ROGGEN",
"(B) DCP GREELEY/DCP SPINDLE"
]);
break;

case "CONDENSATE":
f.setItems(["Select Condensate",
"(CON) DCP GODFREY/DCP LUCERNE",
"(CON) DCP GREELEY/DCP LUCERNE",
"(CON) DCP GREELEY/DCP MEWBOURN",
"(CON) DCP GREELEY/DCP O'CONNOR",
"(CON) DCP GREELEY/DCP ROGGEN",
"(CON) DCP GREELEY/DCP SPINDLE",
"(CON) DCP LIBSACK/DCP LUCERNE",
"(CON) DCP ROGGEN/DCP LUCERNE",
"(CON) DCP SPINDLE/DCP LUCERNE",
"(CON) DCP SPINDLE/DCP MEWBOURN",
"(CON) DCP SPINDLE/DCP O'CONNOR",
"(CON) DCP THROUDT/DCP LUCERNE",
"(CON) NORTH STAR/DCP KERSEY",
"(CON) NORTH STAR/DCP LUCERNE",
"(CON) NORTH STAR/DCP O'CONNOR",
"(CON) NORTH STAR/DCP SPINDLE"
]);
break;

case "GASOLINE":
f.setItems(["Select Gasoline",
"(G) DCP GREELEY/DCP LUCERNE",
"(G) DCP GREELEY/DCP O'CONNOR",
"(G) DCP GREELEY/DCP ROGGEN",
"(G) DCP GREELEY/DCP SPINDLE",
"(G) DCP LUCERNE/DCP SPINDLE"
]);
break;

case "PENTANE":
f.setItems(["Select Pentane",
"(PEN) DCP GREELEY/DCP LUCERNE",
"(PEN) DCP GREELEY/DCP LUCERNE",
"(PEN) DCP GREELEY/DCP O'CONNOR",
"(PEN) DCP GREELEY/DCP ROGGEN",
"(PEN) DCP GREELEY/DCP SPINDLE",
"(PEN) DCP GREELEY/DCP SPINDLE"
]);
break;

case "PROPANE":
f.setItems(["Select Propane",
"(PRO) DCP GREELEY/AGFINITY BARNESVILLE",
"(PRO) DCP GREELEY/AGFINITY GILCREST",
"(PRO) DCP GREELEY/AGFINITY HENDERSON",
"(PRO) DCP GREELEY/AGFINITY HYGIENE",
"(PRO) DCP GREELEY/AGFINITY LUCERNE",
"(PRO) DCP GREELEY/AGFINITY MEAD",
"(PRO) DCP GREELEY/AGFINITY NUNN",
"(PRO) DCP GREELEY/DCC NUNN",
"(PRO) DCP GREELEY/DCP LUCERNE",
"(PRO) DCP GREELEY/DCP LUCERNE",
"(PRO) DCP GREELEY/DCP MEWBOURN",
"(PRO) DCP GREELEY/DCP O'CONNOR",
"(PRO) DCP GREELEY/DCP PLATTEVILLE",
"(PRO) DCP GREELEY/DCP ROGGEN",
"(PRO) DCP GREELEY/DCP SPINDLE",
"(PRO) DCP GREELEY/FERRELL BERTHOUD",
"(PRO) DCP GREELEY/FERRELL COLORADO SPRINGS",
"(PRO) DCP GREELEY/FERRELL CONIFER",
"(PRO) DCP GREELEY/FERRELL ELIZABETH",
"(PRO) DCP GREELEY/FERRELL ESTES PARK",
"(PRO) DCP GREELEY/FERRELL FAIRPLAY",
"(PRO) DCP GREELEY/FERRELL FRISCO",
"(PRO) DCP GREELEY/FERRELL GERING NE (SCHWANS)",
"(PRO) DCP GREELEY/FERRELL GRANBY",
"(PRO) DCP GREELEY/FERRELL HENDERSON (BLUE RHINO)",
"(PRO) DCP GREELEY/FERRELL HENDERSON (RT)",
"(PRO) DCP GREELEY/FERRELL IDAHO SPRINGS",
"(PRO) DCP GREELEY/FERRELL LAKE GEORGE",
"(PRO) DCP GREELEY/FERRELL LEADVILLE",
"(PRO) DCP GREELEY/FERRELL LOVELAND",
"(PRO) DCP GREELEY/FERRELL MONUMENT",
"(PRO) DCP GREELEY/GALETON SCHOOL",
"(PRO) DCP GREELEY/KIVA AULT FEED MILL",
"(PRO) DCP GREELEY/KIVA GREELEY",
"(PRO) DCP GREELEY/MILE HIGH CANON CITY",
"(PRO) DCP GREELEY/MILE HIGH THORNTON",
"(PRO) DCP GREELEY/NGL BENNETT",
"(PRO) DCP GREELEY/NGL BOULDER",
"(PRO) DCP GREELEY/NGL ENGLEWOOD",
"(PRO) DCP GREELEY/NGL LAKEWOOD",
"(PRO) DCP GREELEY/NGL MILLIKEN",
"(PRO) DCP GREELEY/NGL PROSPECT VALLEY",
"(PRO) DCP GREELEY/NGL STRASBURG",
"(PRO) DCP GREELEY/POLAR BRIGGSDALE",
"(PRO) DCP GREELEY/POLAR FT LUPTON",
"(PRO) DCP GREELEY/POLAR GREELEY",
"(PRO) DCP SPINDLE/AGFINITY BARNESVILLE",
"(PRO) DCP SPINDLE/AGFINITY GILCREST",
"(PRO) DCP SPINDLE/AGFINITY HENDERSON",
"(PRO) DCP SPINDLE/AGFINITY HYGIENE",
"(PRO) DCP SPINDLE/AGFINITY LUCERNE",
"(PRO) DCP SPINDLE/AGFINITY MEAD",
"(PRO) DCP SPINDLE/AGFINITY NUNN",
"(PRO) DCP SPINDLE/FERRELL COLORADO SPRINGS",
"(PRO) DCP SPINDLE/FERRELL CONIFER",
"(PRO) DCP SPINDLE/FERRELL ELIZABETH",
"(PRO) DCP SPINDLE/FERRELL ESTES PARK",
"(PRO) DCP SPINDLE/FERRELL FAIRPLAY",
"(PRO) DCP SPINDLE/FERRELL FRISCO",
"(PRO) DCP SPINDLE/FERRELL GERING NE (SCHWANS)",
"(PRO) DCP SPINDLE/FERRELL GRANBY",
"(PRO) DCP SPINDLE/FERRELL HENDERSON (BLUE RHINO)",
"(PRO) DCP SPINDLE/FERRELL HENDERSON (RT)",
"(PRO) DCP SPINDLE/FERRELL IDAHO SPRINGS",
"(PRO) DCP SPINDLE/FERRELL LAKE GEORGE",
"(PRO) DCP SPINDLE/FERRELL LEADVILLE",
"(PRO) DCP SPINDLE/FERRELL LOVELAND",
"(PRO) DCP SPINDLE/FERRELL MONUMENT",
"(PRO) DCP SPINDLE/NGL BENNETT",
"(PRO) DCP SPINDLE/NGL BOULDER",
"(PRO) DCP SPINDLE/NGL ENGLEWOOD",
"(PRO) DCP SPINDLE/NGL FORT COLLINS",
"(PRO) DCP SPINDLE/NGL HENDERSON SOUTH",
"(PRO) DCP SPINDLE/NGL LAKEWOOD",
"(PRO) DCP SPINDLE/NGL MILLIKEN",
"(PRO) DCP SPINDLE/NGL PROSPECT VALLEY",
"(PRO) DCP SPINDLE/NGL STRASBURG",
"(PRO) PLATTE VALLEY/AGFINITY BARNESVILLE",
"(PRO) PLATTE VALLEY/AGFINITY GILCREST",
"(PRO) PLATTE VALLEY/AGFINITY HENDERSON",
"(PRO) PLATTE VALLEY/AGFINITY HYGIENE",
"(PRO) PLATTE VALLEY/AGFINITY LUCERNE",
"(PRO) PLATTE VALLEY/AGFINITY MEAD",
"(PRO) PLATTE VALLEY/AGFINITY NUNN",
"(PRO) PLATTE VALLEY/CDR MILLIKEN",
"(PRO) PLATTE VALLEY/FERRELL COLORADO SPRINGS",
"(PRO) PLATTE VALLEY/FERRELL CONIFER",
"(PRO) PLATTE VALLEY/FERRELL ELIZABETH",
"(PRO) PLATTE VALLEY/FERRELL ESTES PARK",
"(PRO) PLATTE VALLEY/FERRELL FAIRPLAY",
"(PRO) PLATTE VALLEY/FERRELL FRISCO",
"(PRO) PLATTE VALLEY/FERRELL GERING NE (SCHWANS)",
"(PRO) PLATTE VALLEY/FERRELL GRANBY",
"(PRO) PLATTE VALLEY/FERRELL HENDERSON (BLUE RHINO)",
"(PRO) PLATTE VALLEY/FERRELL HENDERSON (RT)",
"(PRO) PLATTE VALLEY/FERRELL IDAHO SPRINGS",
"(PRO) PLATTE VALLEY/FERRELL LAKE GEORGE",
"(PRO) PLATTE VALLEY/FERRELL LEADVILLE",
"(PRO) PLATTE VALLEY/FERRELL LOVELAND",
"(PRO) PLATTE VALLEY/FERRELL MONUMENT",
"(PRO) PLATTE VALLEY/NGL BENNETT",
"(PRO) PLATTE VALLEY/NGL BOULDER",
"(PRO) PLATTE VALLEY/NGL ENGLEWOOD",
"(PRO) PLATTE VALLEY/NGL FORT COLLINS",
"(PRO) PLATTE VALLEY/NGL LAKEWOOD",
"(PRO) PLATTE VALLEY/NGL MILLIKEN",
"(PRO) PLATTE VALLEY/NGL PROSPECT VALLEY",
"(PRO) PLATTE VALLEY/NGL STRASBURG",
"(PRO) PLATTE VALLEY/POLAR FT LUPTON",
"(PRO) SUNCOR/AGFINITY BARNESVILLE",
"(PRO) SUNCOR/AGFINITY GILCREST",
"(PRO) SUNCOR/AGFINITY HENDERSON",
"(PRO) SUNCOR/AGFINITY HYGIENE",
"(PRO) SUNCOR/AGFINITY LUCERNE",
"(PRO) SUNCOR/AGFINITY MEAD",
"(PRO) SUNCOR/AGFINITY NUNN",
"(PRO) SUNCOR/FERRELL COLORADO SPRINGS",
"(PRO) SUNCOR/FERRELL CONIFER",
"(PRO) SUNCOR/FERRELL ELIZABETH",
"(PRO) SUNCOR/FERRELL ESTES PARK",
"(PRO) SUNCOR/FERRELL FAIRPLAY",
"(PRO) SUNCOR/FERRELL FRISCO",
"(PRO) SUNCOR/FERRELL GERING NE (SCHWANS)",
"(PRO) SUNCOR/FERRELL GRANBY",
"(PRO) SUNCOR/FERRELL HENDERSON (BLUE RHINO)",
"(PRO) SUNCOR/FERRELL HENDERSON (RT)",
"(PRO) SUNCOR/FERRELL IDAHO SPRINGS",
"(PRO) SUNCOR/FERRELL LAKE GEORGE",
"(PRO) SUNCOR/FERRELL LEADVILLE",
"(PRO) SUNCOR/FERRELL LOVELAND",
"(PRO) SUNCOR/FERRELL MONUMENT",
"(PRO) SUNCOR/NGL BENNETT",
"(PRO) SUNCOR/NGL BOULDER",
"(PRO) SUNCOR/NGL ENGLEWOOD",
"(PRO) SUNCOR/NGL LAKEWOOD",
"(PRO) SUNCOR/NGL MILLIKEN",
"(PRO) SUNCOR/NGL PROSPECT VALLEY",
"(PRO) SUNCOR/NGL STRASBURG",
"(PRO) WATTENBERG/AGFINITY BARNESVILLE",
"(PRO) WATTENBERG/AGFINITY GILCREST",
"(PRO) WATTENBERG/AGFINITY HENDERSON",
"(PRO) WATTENBERG/AGFINITY HYGIENE",
"(PRO) WATTENBERG/AGFINITY LUCERNE",
"(PRO) WATTENBERG/AGFINITY MEAD",
"(PRO) WATTENBERG/AGFINITY NUNN",
"(PRO) WATTENBERG/FERRELL COLORADO SPRINGS",
"(PRO) WATTENBERG/FERRELL CONIFER",
"(PRO) WATTENBERG/FERRELL ELIZABETH",
"(PRO) WATTENBERG/FERRELL ESTES PARK",
"(PRO) WATTENBERG/FERRELL FAIRPLAY",
"(PRO) WATTENBERG/FERRELL FRISCO",
"(PRO) WATTENBERG/FERRELL GERING NE (SCHWANS)",
"(PRO) WATTENBERG/FERRELL GRANBY",
"(PRO) WATTENBERG/FERRELL HENDERSON (BLUE RHINO)",
"(PRO) WATTENBERG/FERRELL HENDERSON (RT)",
"(PRO) WATTENBERG/FERRELL IDAHO SPRINGS",
"(PRO) WATTENBERG/FERRELL LAKE GEORGE",
"(PRO) WATTENBERG/FERRELL LEADVILLE",
"(PRO) WATTENBERG/FERRELL LOVELAND",
"(PRO) WATTENBERG/FERRELL MONUMENT",
"(PRO) WATTENBERG/NGL BENNETT",
"(PRO) WATTENBERG/NGL BOULDER",
"(PRO) WATTENBERG/NGL ENGLEWOOD",
"(PRO) WATTENBERG/NGL LAKEWOOD",
"(PRO) WATTENBERG/NGL MILLIKEN",
"(PRO) WATTENBERG/NGL PROSPECT VALLEY",
"(PRO) WATTENBERG/NGL STRASBURG"
]);
break;

case "Y GRADE":
f.setItems(["Select Y Grade",
"(Y) DCP PLATTEVILLE/DCP GREELEY",
"(Y) DCP PLATTEVILLE/DCP GREELEY",
"(Y) DCP PLATTEVILLE/DCP LUCERNE",
"(Y) DCP PLATTEVILLE/DCP LUCERNE",
"(Y) DCP ROGGEN/DCP GREELEY",
"(Y) DCP ROGGEN/DCP LUCERNE"
]);
break;

case "MIX BG":
Itemlist.setItems(["Mix BG",
"(BG) DCP SPINDLE/DCP LUCERNE"
]);
break;

case "MISC":
f.setItems(["Misc",
"EQUIPMENT MOVE",
"LOAD CANCELED",
"LOAD DEFERRED",
"NO LOADS",
"OFF",
"PICKED UP TRAILER",
"REJECT",
"RETURN PRODUCT",
"SAFETY MEETING",
"TRAINING",
"TRUCK IN SHOP"
]);
break;

default:
f.setItems([""]);
break;
}

}

Votes

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
Community Expert ,
Jul 10, 2023 Jul 10, 2023

Copy link to clipboard

Copied

For case "MIX BG" you are set items to ItemList instead of f.

Votes

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
Community Beginner ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

I forgot to change that one. Thanks for seeing that. I fixed it but that was only on the first set and those work fine (with the fix). But none of the other sets work. Have you had a chance to look at the coding and figure out why? Thank you for your time. It is very much appreciated.

Votes

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
Community Beginner ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

I also fixed the CUSTOM FORMAT SCRIPT for each Locations dropdown. I noticed that they all had getField("PRODUCT_1") so I changed each one to match the corresponding product dropdown. The 2nd set of dropdowns are now working but none of the rest still.

Votes

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
Community Expert ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

Since you use scripts at 'Validate' remove 'event.willCommit' part.

Votes

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
Community Beginner ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

I removed that and now each "location" dropdown accepts the listing from the 1st. So if I select butane in product, the butane list shows in the location dropdown; however when I select one of the options in the location dropdown, it doesn't stay selected. It goes back to the default selection (so if it's butane, it stays on butane, if it's gasoline, it stays on gasoline). Any advice on what to do next?

Votes

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
Community Expert ,
Jul 11, 2023 Jul 11, 2023

Copy link to clipboard

Copied

That's because you use format script in "Location's" fields to show 'Product' field value.

Votes

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
Community Beginner ,
Jul 12, 2023 Jul 12, 2023

Copy link to clipboard

Copied

I think it's so close to being right. I really hate bugging you like this. So your last suggestion worked. Now when I select a location in the location dropdown it stays....sort of. So number 2 and number 3 work perfectly. #1 works until you select something from set 4-8. Then whatever is selected in those, then changes #1. I've checked and rechecked and it looks like everything is the same on all of them except the first line in the validation code so I have no idea why it's doing this. Any ideas?

Votes

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
Community Expert ,
Jul 12, 2023 Jul 12, 2023

Copy link to clipboard

Copied

There is probably some bug with name "Locations_1", because even when all script removed it still changes.

Try to rename that field to "Locations_0" or recreate fields in new file.

Votes

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
Community Beginner ,
Jul 12, 2023 Jul 12, 2023

Copy link to clipboard

Copied

I renamed them and they work perfectly....on the computer. Any idea why it won't work on a mobile device? The product dropdown works but the locations dd doesn't.

Votes

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
Community Expert ,
Jul 12, 2023 Jul 12, 2023

Copy link to clipboard

Copied

++Adding to the discussion,

 

Hi @n2dzyne ,

 

The JavaScript scripting language is different in mobile devices.

 

This limitation is in part dependent on the mobile device's operating system where the PDF reader/editor app is hosted.

 

As a result, some of the PDF editing features that we enjoy in the full desktop versions of Acrobat may not render properly (or at all) in the mobile versions of the app.

Votes

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 ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

Hi @Nesa Nurani I am unable to save custom validation javascript. Please check the attached video.

Votes

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
Community Expert ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

Did you try to close the program or reset your PC and then try again?

Votes

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 ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

@Nesa Nurani yes tried that already but doesn't work. The same script works on pdfsmart.com

Votes

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
Community Expert ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

Can you share your file and the script you try to use?

 

Votes

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 ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

@Nesa Nurani attached the pdf.
The script I am adding is 
var f = this.getField("Items");
switch(event.value){
case "Fruits":
f.setItems(["Banana","Apple","Lemon","Orange"]);
break;
case "Veggies":
f.setItems(["Tomato","Cabbage"]);
break;
case "Other":
f.clearItems();}

Votes

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
Community Expert ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

Works fine for me.

Votes

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 ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

LATEST

this! *chef's kiss* I had gone through 1000 different answers and yours was so simple and perfect and thank you so much!!!!

Votes

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 ,
Sep 22, 2022 Sep 22, 2022

Copy link to clipboard

Copied

Hi! I used the below formula posted by Nesa and it worked however whenever I select something in the dropdown 2 after selecting an option from the first dropdown 1, it keeps defaulting to the first value listed for dropdown 2. How do I get rid of this default?

 

 

Votes

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
Community Expert ,
Sep 22, 2022 Sep 22, 2022

Copy link to clipboard

Copied

Use script in 'validation' tab, not 'calculation'.

Votes

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