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

Calculate a form field

New Here ,
Sep 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

I am trying to create a fillable form for a clothing order for our company.  I want to have a drop down list of our clothing options to order ( Sweatshirt, Tshirt,etc.).  Some shirts have different sizes available so I would like for when they select their option in the first drop down list, that the second drop down would populate just the sizes available for that clothing option.  Is this even possible?

 

Disclaimer- I'm very new to Adobe, so I need a lot of help and dumbing down of answers- Thanks! 🙂

TOPICS
How to , PDF forms

Views

258

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 15, 2020 Sep 15, 2020

Copy link to clipboard

Copied

LATEST

Hi,

 

This is fairly easy to do, if you place a script similar to this on the validate (validate, see image below) of the first drop down ( the Sweatshirt. tshirt) one, and make sure the name in the getField method is the size drop you want. Then code like this should work.

var otherDD = this.getField("Dropdown2"); // change to match name of your size dropdown.
console.println ( event.value);

if (event.value == "T-Shirt") {
otherDD.clearItems();
otherDD.insertItemAt("Small");
otherDD.insertItemAt("Medium");
} else if ( event.value == "Sweatshirt"){
otherDD.clearItems();
otherDD.insertItemAt("Medium");
otherDD.insertItemAt("Large");
}

You also want to make sure the option for "Commit Selected value immediately" is checked on the properties dialog

BarlaeDC_0-1600184290672.png

 

Hope this helps

 

Malcolm

 

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