Skip to main content
luckyrhyno
Participant
December 29, 2017
Answered

Help with simple "If Then"

  • December 29, 2017
  • 2 replies
  • 621 views

I apologize in advance. I am sure this has been asked and answered here more than once already, however I am not getting anything when I search and I am sure that is due to my ignorance on the subject and not searching it the right way.

My question

I am building a form for a contract. In the Contract I have term limits, for example 3 years or 5 years. This term is referenced several times in the document in various ways. For example: 3 years, three (3) years, 36 months.

I want to be able to choose from a picklist either 3 or 5 and have it auto populate the other fields with their version required.

If 3 years is selected in field1, than for field2 = "three (3)", field3 = "36"

I hope I am asking this the right way.

I appreciate your help.

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

Here is an article on exactly this topic.

https://acrobatusers.com/tutorials/change_another_field

2 replies

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
December 29, 2017

Here is an article on exactly this topic.

https://acrobatusers.com/tutorials/change_another_field

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Inspiring
December 29, 2017

You will have to do this using custom JavaScript code. There is no easy pick an item. This means you need to provide field names and expected format for those fields. I would use the drop box's custom keystroke with the drop box "commit immediately" option selected. And then code to text the selected item and depending upon the value setting  each field as needed.