Skip to main content
Known Participant
December 4, 2018
Question

How do I add a box next to a title and have it copy that title to another page in a PDF document?

  • December 4, 2018
  • 1 reply
  • 1560 views

I am compiling an ebook and want to make it so that the title of each page

can be copied to another page by clicking a box,  each page will be copied

to the same page if box clicked and that page is (Journey Planner)...in adobe acrobat so

correct Javascript required please.....

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
December 4, 2018

So you want to create a button that puts a certain text into a text field when clicked? It's simple. Add this code as the button's MouseUp event:

this.getField("Text1").value = "Journey Planner";

Known Participant
December 5, 2018

Hi try67

don't think I was clear about what i want to do....

I want to be able to do this.......300 page book, imported as PDF document into acrobat,

if a click box is checked then the page title will be added to a list. "Journey Planner Page"

the script you have given doesn't work..all I am getting is a dotted square with no text.?

is that because I dont have a text box on the recipient page"JourneyPlanner"?

or is it because the text that I want to transfer is not in a text box?

again thank you for your help

try67
Community Expert
Community Expert
December 5, 2018

check box name "Add"

just so I am clear, I need to be able to do this on any page out of the 300 and so make a list

in "Text33" of all check boxes clicked.......say anything from 3 to 15 in the list...


You can't use the same field name for all the check-boxes. Each one will have to have a unique name.

Let's say that if "Add1" is ticked then "Text33" should show "Journey Planner".

You can use this code as the custom calculation script of Text33:

var items = [];

if (this.getField("Add1").valueAsString!="Off") items.push("Journey Planner");

if (this.getField("Add2").valueAsString!="Off") items.push("Something else");

if (this.getField("Add3").valueAsString!="Off") items.push("Yet another thing"); // etc.

event.value = items.join(", ");