0
Help with code
New Here
,
/t5/acrobat-discussions/help-with-code/td-p/13402929
Dec 07, 2022
Dec 07, 2022
Copy link to clipboard
Copied
Hello,
I am trying to code two drop downs. The first is called Session1endtime. When this drop down gets a time selected (lets say 9:00) I want my second dropwdown called SessionType1 to give me a specific list of options depending on the first dropdown end time.
TOPICS
Create PDFs
,
Edit and convert PDFs
,
How to
,
JavaScript
,
PDF forms
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/acrobat-discussions/help-with-code/m-p/13403596#M389926
Dec 07, 2022
Dec 07, 2022
Copy link to clipboard
Copied
You can use setItems() to populate second dropdown, here is an example script used at 'Validation' of first dropdown:
if(event.value == "9:00")
this.getField("SessionType1").setItems(["Item1","Item2"]);
else if(event.value == "10:00")
this.getField("SessionType1").setItems(["Item3","Item4"]);
else
this.getField("SessionType1").clearItems();
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

