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!
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
...
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 = "";}
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.
Copy link to clipboard
Copied
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".