Copying multiple field boxes to one single field box as a read only

Community Beginner ,
Mar 20, 2018

Copy link to clipboard

Copied

I am setting up a form that has a comments section. The comments section consist of multiple boxes (font size and font set) to ensure the text doesn't change so that it stays over the lines in form design. I want to take the entire text from all box fields and copy to one individual box on a separate page. I am sure this will require script of some sort, can anyone help me to do this?

These boxes:

Screen Shot 2018-03-20 at 4.52.03 PM.png

to this box:

Screen Shot 2018-03-20 at 4.52.17 PM.png

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Sure, it can be done using a script. Let's say the individual fields are called Comment1, Comment2, Comment3 etc.

Use this code as the custom calculation script of the multiline field where you want to show the combined value:

event.value = this.getField("Comment1").valueAsString + "\n" + this.getField("Comment2").valueAsString+ "\n" + this.getField("Comment3").valueAsString;

TOPICS
Acrobat SDK and JavaScript

Views

78

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Copying multiple field boxes to one single field box as a read only

Community Beginner ,
Mar 20, 2018

Copy link to clipboard

Copied

I am setting up a form that has a comments section. The comments section consist of multiple boxes (font size and font set) to ensure the text doesn't change so that it stays over the lines in form design. I want to take the entire text from all box fields and copy to one individual box on a separate page. I am sure this will require script of some sort, can anyone help me to do this?

These boxes:

Screen Shot 2018-03-20 at 4.52.03 PM.png

to this box:

Screen Shot 2018-03-20 at 4.52.17 PM.png

Most Valuable Participant
Correct answer by try67 | Most Valuable Participant

Sure, it can be done using a script. Let's say the individual fields are called Comment1, Comment2, Comment3 etc.

Use this code as the custom calculation script of the multiline field where you want to show the combined value:

event.value = this.getField("Comment1").valueAsString + "\n" + this.getField("Comment2").valueAsString+ "\n" + this.getField("Comment3").valueAsString;

TOPICS
Acrobat SDK and JavaScript

Views

79

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 20, 2018 0
Most Valuable Participant ,
Mar 20, 2018

Copy link to clipboard

Copied

Sure, it can be done using a script. Let's say the individual fields are called Comment1, Comment2, Comment3 etc.

Use this code as the custom calculation script of the multiline field where you want to show the combined value:

event.value = this.getField("Comment1").valueAsString + "\n" + this.getField("Comment2").valueAsString+ "\n" + this.getField("Comment3").valueAsString;

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 20, 2018 1
Community Beginner ,
Mar 20, 2018

Copy link to clipboard

Copied

thank you

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 20, 2018 0
Community Beginner ,
Mar 20, 2018

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 20, 2018 0