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

Script help Acrobat

Community Beginner ,
Oct 09, 2023 Oct 09, 2023

Hi, can someone please help?

 

I have a PDF form with actions in fields. One field has drop down options to select, six of them. I'm trying to have each option trigger options for another drop down field. Is this possible? Can someone help me with the script with this? Once I have the script, I think I put it in the validate section.

 

I appreciate any help.

 

G

TOPICS
JavaScript , PDF forms
1.3K
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 ,
Oct 09, 2023 Oct 09, 2023

It's possible, but you need to tell us more information, like field names, selections in dropdown and what exactly you need to happen.

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 Beginner ,
Oct 09, 2023 Oct 09, 2023

Thank you for your reply Nesa! The field name is " building name" and the selections in the drop drop down are:

Pemberton

Baker Science

Union

McLeod

Library

Smith Nooks

 

Below are the options, I wanted to pop up for each selection

Pemberton - auditorium, conference room

Baker Science - auditorium, classroom

Union - cafeteria, ballroom, conference room, basement

McLeod - Innovation Lab, Lab room

Library - Upstairs area, downstairs area

Smith Nooks - Conference Room

 

and they select the specific room depending on which option they choose. I appreciate your help!

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

As the custom Validation script of the first field you can use something like this:

 

if (event.value=="Pemberton") this.getField("Dropdown2").setItems(["auditorium", "conference room"]);
else if (event.value=="Baker Science") this.getField("Dropdown2").setItems(["auditorium", "classroom"]);
//etc.
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 Beginner ,
Oct 10, 2023 Oct 10, 2023

Thank you thank you !!! I will try this

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

PS. If you don't want the first item to be selected by default add an empty string (or something like "Select") as the first item in each array.

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 Beginner ,
Oct 10, 2023 Oct 10, 2023
LATEST

thank you for this! I didn't know what 'select' would be called, I learned something new 'empty string', I'll come back with how it worked out

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