These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

How to combine contents two text boxes into one text box

Novice Acrobat User
Registered: Jan 11 2010
Posts: 5
Answered

Thanks in advance for your help, as I am a novice user. In Adobe Acrobat 7, am trying to create a form that autopopulates text boxes in several pages. For example, first name will populate on all text boxes named "first name". I am wondering if there's a way to combine the contents of two text boxes into one box. For instance, can I have text box called "first name" plus text box called "last name" to autopopluate the text box called "full name"? I know this question is probably pretty simple, so thanks for walking me through it.

My Product Information:
Acrobat Pro 7.1.4, Windows
try67
Expert
Registered: Oct 30 2008
Posts: 2399
Enter the following code into full name's custom calculation script (I've added a space between the names... I assume you want that):
event.value = this.getField("first name").value + " " +  this.getField("last name").value;

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

Novice Acrobat User
Registered: Jan 11 2010
Posts: 5
Did I do it correctly? I went into the text field properties box. Under Actions, I selected the trigger mouse up and action is run a javascript. I added the one you gave me by copying and pasting, but when I close out the properties box, it doesn't work. Did I miss something? Thanks so much for your help!
Novice Acrobat User
Registered: Jan 11 2010
Posts: 5
Disregard my last post; I got it to work when I actually followed your directions! I added it to the custom calculation script box. Thanks so much for your help!