Skip to main content
Participant
January 29, 2018
Answered

populate different text fields with same value based on single dropdown

  • January 29, 2018
  • 1 reply
  • 560 views

I'm preparing a form with some custom calculations in Adobe Acrobat Pro DC and I'm fairly new to javascript, especially concerning form PDFs.

I have a single dropdown with three values (A, B, C) and six numeric fields (1, 2, 3, 4, 5, 6). The dropdown's default value is null and each field's default value is 0. When the dropdown = A, I'd like 1 and 4 to auto-populate with "25";

dropdown = B, 2 and 5 auto-populate with 20;

dropdown = C, 3 and 6 auto-populate with 15.

What kind of functions should I use to achieve this, and where do I put the script?

Thank you!

This topic has been closed for replies.
Correct answer Thom Parker

Read these two articles, they explain everything you need to know about dropdown/list fields:

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

https://acrobatusers.com/tutorials/change_another_field

1 reply

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
January 29, 2018

Read these two articles, they explain everything you need to know about dropdown/list fields:

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

https://acrobatusers.com/tutorials/change_another_field

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