Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've got a PDF form in Acrobat X Pro where users can enter their name in a textbox on the first page. I would like the contents of that box to be cloned/mirrored in another box on the second page of the same form:

Sample form

However, in the Properties dialog of the second textbox, I can't find a way to reference the first one. I do have options to calculate numerical values and perform validation etc. etc., but I can't seem to simply have it display the contents of another textbox. Is this not possible in PDF forms, or am I overlooking something obvious?

share|improve this question
    
Have you tried using the run javascript option? –  soandos Jun 20 '12 at 8:26
    
@soandos: No, how would that work? –  Tim Pietzcker Jun 20 '12 at 8:33

2 Answers 2

up vote 3 down vote accepted

I believe that this can be done in the following manner (there is probably a better way, but I don't know it):

  1. On the first text box, set an action (right click on the text control) to "Run JavaScript".
  2. Choose the trigger "On Blur" (so the script will be run when the user exits the field)
  3. Click "Add"
  4. In the javascript editor, set the value of the other text boxes.

For example, to copy the contents of the textbox named "Name" into the box named "NameClone":

var n1 = this.getField("Name");
var n2 = this.getField("NameClone");
n2.value = n1.value;

Make sure all of your other boxes are locked.

Note: some documentation can be found here, you might be interested in page 74.

share|improve this answer
    
Thanks! With this answer and the help of the link you provided, I was able to make this work. I've edited your answer accordingly (but don't have enough rep to make it stick, please review my changes). –  Tim Pietzcker Jun 20 '12 at 8:58
    
I am pretty sure that you could just have used: this.getField("NameClone").value = this.getField("Name").value; but whatever works for you –  soandos Jun 20 '12 at 9:14

The simplest way!

I accidentally wrote "field name" of the same name from two different text box, after I save and preview defaults and try typing. what happens as you wish

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.