Copy link to clipboard
Copied
I'm new to using JavaScript in Adobe. I have developed a drop down with a list of Therapy Providers (dropdown property name: "Therapy Provider"). When a specific provider from the list is selected I would like the clinics billing address to population in the Text box ("Text3"). How would I write the JavaScript for the following example:
Therapy Provider Selected from dropdown: "ABC Therapy Clinic"
Address to have auto polulated in when the above clinic is selected: "1234 Alphabet St.; Townsville, NY 55555"
THANK YOU SO MUCH!
Copy link to clipboard
Copied
Here's an article on the topic
https://acrobatusers.com/tutorials/change_another_field/
The article outlines a general methodology for setting data based on a dropdown selection. But a very simple brute force method is to use a validation script on the dropdown like this:
if(event.value == "ABC Therapy Clinic")
this.getField("Text3").value = "1234 Alphebet St.; Townsville, NY 55555";
else if(event.value == "Another Therapy Clinic")
this.getField("Text3").value = "Somewhere else; Townsville, NY 55555";
etc...