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

Combine multiple texr fields into one

New Here ,
Mar 19, 2018 Mar 19, 2018

I`m new here. Can you help me or direct me to the answer. I want concentrate in Adobe Acrobat Pro multiple text field values in one and in that field values are as a list etc.

Value1

Value2

Value3

Thank you in advance for your help.

TOPICS
Acrobat SDK and JavaScript , Windows
720
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 ,
Mar 19, 2018 Mar 19, 2018

You can use this script as the custom calculation script of the target field:

event.value = this.getField("Value1").valueAsString + ", " + this.getField("Value2").valueAsString + ", " + this.getField("Value3").valueAsString;

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
New Here ,
Mar 19, 2018 Mar 19, 2018

Thank you for your answer.

Result is this:

field1.png

I want to be like this (I used paint to change it):

fieldwanttobe.png

Thanks in advance

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 ,
Mar 19, 2018 Mar 19, 2018

In the code above, replace ", " with "\n". Also, make sure the field is set as Multiline.

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
New Here ,
Mar 19, 2018 Mar 19, 2018
LATEST

I thank you some much! I´m novice in Javascript.

Cheers!

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