Auto Populate text or list box from a drop down menu

New Here ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

Hi can anyone help 

Im trying to understand the basics of using PDF forms to Auto Populate a text box or list box.

 

My example is

 

Dropdown menu would have three options 

A B and C 

A = 10 , B = 20 and C = 30.

 

So I  want to be able to select A in the drop down menu and the number 10 to appear or be selected in another box. Then if B is selected the number 10 would change to 20 and so on. Can anyone help.

 

Thank you

 

My simplest example is below. I'm planning on using this for something else but as long as the script works and I can change the options instead of a,b and c and the numbers its fine thanks

TOPICS
Create PDFs, How to, JavaScript, PDF forms

Views

25

Likes

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
Adobe Community Professional ,
Mar 02, 2021 Mar 02, 2021

Copy link to clipboard

Copied

LATEST

Lets say your dropdown field is named "Dropdown1"

As "custom calculation script" of text field use this:

event.value = this.getField("Dropdown1").value;

 

EDIT: I assume you know how to set items in dropdown and give them export value?

Likes

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