item list to automatically change text box

New Here ,
Aug 15, 2022 Aug 15, 2022

Copy link to clipboard

Copied

I have no knowledge on how to use javascript etc and have searched this community for code on how to set up drop down list to auto change another text field. I have a product drop down with 2 options and i want a separate text field to change the list price.  I can't understand the code and settings i need to set this up in my Adobe pdf form.

 

The drop down is called "Item Description_Device1"

the text field is "List Price1".

 

Can someone help me create the code and tell me where i need to copy and paste it? 

Under properties, I have "options" and "Selection change" tab to enter "Execute this script".

 

Thanks!

TOPICS
PDF forms

Views

27

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
Community Expert ,
Aug 15, 2022 Aug 15, 2022

Copy link to clipboard

Copied

Here's an article that discusses the topic:

https://acrobatusers.com/tutorials/change_another_field/

 

There's also lots of info here on list and dropdown programming in Acrobat. Although most of it is not free.

https://www.pdfscripting.com/public/List-Field-Usage-and-Handling.cfm

 

You might want also want to consider hiring a developer to help you out. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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
Community Expert ,
Aug 15, 2022 Aug 15, 2022

Copy link to clipboard

Copied

LATEST

If you have "Selection change" tab, that means you have 'List Box' field and not 'Dropdown'.

Either way, under 'Options' tab in that field where you set items, give each item export value to be the price you wish to show in field "List Price1" for that item and then in "List Price1" field under 'Calculate' tab as custom calculation script use this:

event.value = this.getField("Item Description_Device1").value;

 

You can also tick, 'Commit selected value immediately' in "Item Description_Device1" field 'Options' tab if you wish to commit value without need to click outside field first.

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