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

PRO DC - Help creating 2 dropdowns and 1 text field (auto populate w/ ability to edit)

Community Beginner ,
May 07, 2024 May 07, 2024

Copy link to clipboard

Copied

I am not very good with Adobe Acrobat Pro DC and need help!  I am trying to create a dropdown connected to another dropdown, which then determines an auto-populated text field.  I also need the auto-populated text field to allow manual text changes/additions.  I have attached an example of what I am needing.  Does anyone have suggestions for the proper scripts for each dropdown and text field?  Thank you!

TOPICS
PDF

Views

273

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 1 Correct answer

Community Expert , May 07, 2024 May 07, 2024

There are already so many answers to these questions on the forum.

As 'Custom Validate' script of "PETS" dropdown, use this:

var type = this.getField("TYPE");
switch(event.value){

case "Dog":
type.setItems(["Lab","Poodle"]);
break;

case "Cat":
type.setItems(["Saimese","Persian"]);
break;

default:
type.clearItems();}

 As 'Custom Validate' script of "TYPE" dropdown, use this:

var trait = this.getField("TRAIT");
switch(event.value){

case "Lab":
trait.value = "Friendly";
break;

case "Poodle":
t
...

Votes

Translate

Translate
Community Expert ,
May 07, 2024 May 07, 2024

Copy link to clipboard

Copied

There are already so many answers to these questions on the forum.

As 'Custom Validate' script of "PETS" dropdown, use this:

var type = this.getField("TYPE");
switch(event.value){

case "Dog":
type.setItems(["Lab","Poodle"]);
break;

case "Cat":
type.setItems(["Saimese","Persian"]);
break;

default:
type.clearItems();}

 As 'Custom Validate' script of "TYPE" dropdown, use this:

var trait = this.getField("TRAIT");
switch(event.value){

case "Lab":
trait.value = "Friendly";
break;

case "Poodle":
trait.value = "Smart";
break;

default:
trait.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 ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

Thank you so much for your help!   This was my first time using Adobe Community so it was very unfamiliar.  Next time I will do a better job searching for answers to my questions before posting.  Again, thank you for taking the time to help me.  I spent hours trying different scripts prior to your help.

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 ,
May 14, 2024 May 14, 2024

Copy link to clipboard

Copied

LATEST

If I select "Select" under the "PETS" dropdown list, is there a script to prevent the words "Select" from printing?  I don't want the item "Select" to print, but I want "Dog" and "Cat" to print.

 

Also, is there a script in which I can add 10 years to a date field?  For example, if I select today's date 5/14/2024, it will show on my form as "5/14/2034".

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