Skip to main content
Participant
January 19, 2018
Answered

Trying to replicate an excel formula in a form

  • January 19, 2018
  • 2 replies
  • 670 views

Hello all,

In Excel, I had a dropdown cell and then other cells throughout the page linked to item selected in the dropdown to change based on the selection.  In practice it's a simple IF THEN statement, however I'm having trouble replicating this in JavaScript.

For example, if the dropdown box choices are (Gold, Silver, Copper), then I need a separate textbox to populate with (150,100,50) respectively, and then another separate textbox still linked to the dropdown choice to populate with (A,B,C) etc and so on throughout the page as needed, all hinging on the dropdown choice selected.

This is what I used in Excel, is this possible to replicate?

  =IF($I$12="Gold",150,IF($I$12="Silver",100,IF($I$12="Copper",50,IF($I$12="________",0))))

Any advice or direction would be appreciated.  Thank you.

Eric

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

Read this:

https://acrobatusers.com/tutorials/change_another_field

2 replies

JR Boulay
Community Expert
Community Expert
January 23, 2018

This free tool allows you to use hidden JavaScript functionality in Acrobat Standard : Document Level Scripts With Acrobat Standard - KHKonsulting LLC

Acrobate du PDF, InDesigner et Photoshopographe
Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
January 19, 2018
Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participant
January 22, 2018

Thanks, that seemed to work, though it required me to upgrade my 9 to 9 Pro!

Thom Parker
Community Expert
Community Expert
January 22, 2018

So you had Standard?  The old 9 standard limited script development through the UI. However, it's possible to insert the scripts into the correct places using a console script. So standard actually has most of the functionality of Pro, it's just not on the UI.

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