Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help with simple "If Then"

New Here ,
Dec 29, 2017 Dec 29, 2017

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.

TOPICS
Acrobat SDK and JavaScript
534
Translate
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

correct answers 1 Correct answer

Community Expert , Dec 29, 2017 Dec 29, 2017

Here is an article on exactly this topic.

https://acrobatusers.com/tutorials/change_another_field

Translate
LEGEND ,
Dec 29, 2017 Dec 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.

Translate
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 ,
Dec 29, 2017 Dec 29, 2017
LATEST

Here is an article on exactly this topic.

https://acrobatusers.com/tutorials/change_another_field

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

Translate
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