Avatar of zurichexpat
zurichexpat
 asked on

Filling other fields automatically based on an answer selected from a drop down menu?

I am creating a PDF document with teacher's names and I have created a drop down menu of the names. I would like another field to populate with the teacher's full address is their name is selected. This is my first attempt at using JavaScript and I have no idea where to put what and how. Thanks for your help!
JavaScript

Avatar of undefined
Last Comment
zurichexpat

8/22/2022 - Mon
Bob Learned

Here is the funny thing--I too "have no idea where to put what and how".  You would need to give us a little more information, please.
zurichexpat

ASKER
:-) right. One field would be a drop down menu of names and I would also like to have another field labeled address that is automatically populated with the address that corresponds to the name picked from the drop down menu. I don't have any more information than that.

Thanks.
Bob Learned

1) Did you want to use plain JavaScript or JQuery?

2) What do you need to know to get started?  Do you need to know the syntax for creating a script block?
Your help has saved me hundreds of hours of internet surfing.
fblack61
zurichexpat

ASKER
I would like to use plain JavaScript.

I would like to know what the syntax is for creating the script and where do I add it into the document or what are the steps to adding it i.e., create custom action, etc.?

Thanks.
Bob Learned

What I guess I am trying to find out, is how much do you already know?  

1) Have you started looking at any tutorials?

JavaScript basics
https://developer.mozilla.org/en-US/Learn/Getting_started_with_the_web/JavaScript_basics

2) What are you using for a development environment (Visual Studio, Eclipse, ...)?
zurichexpat

ASKER
I know very little. I found this post here:

https://www.experts-exchange.com/questions/23879710/Populate-a-PDF-form-field-based-on-drop-down-selection.html

...and think this is what I need to do but I was confused as to where this string would go in the PDF.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Bob Learned

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
zurichexpat

ASKER
Thanks for your help. Apologies for the goose chase.