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

Help with code

New Here ,
Dec 07, 2022 Dec 07, 2022

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
375
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 ,
Dec 07, 2022 Dec 07, 2022
LATEST

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();

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