Skip to main content
Participating Frequently
September 29, 2008
Question

How to LINK two or more Text Field

  • September 29, 2008
  • 19 replies
  • 106386 views
I have already asked once to get help with creating a link between two text fields (two fields created with a text tool) so that when text reached the end of one text field it will simply go into another. The given explanation was not specific enough. If you know how to do this and are willing to help, would you PLEASE give me SPECIFIC instructions, step-by-step on how this is done. Please do not assume that I have worked with the Adobe Acrobat program all my life. Thanks :)

19 replies

New Participant
April 7, 2025

So I'm guessing "Distribute across pages" wasn't a feature in 2008?

New Participant
May 23, 2023

I FOUND THE ANSWER! So this site helped me Add tooltip, date & time, required or not required, multi-line text, and calculated values in a PDF form (adobe.com)

 

If you don't  wanna read all that the best way I can describe is when you have the pdf. Click on 'Prepare Form' (its an icon on the right side). Then the fields and titles will show a side bar with the names of all the fields on all the pages broken down (itemized). Make sure both of the fields you are trying to connect are titled exactly the same. when you click on the right side bar title. If you call 1 field name make sure the other says name too, not 'employee name' and the other just says name. They won't connect. Then click out of that icon and type the word you want in that field the name of the person and it should be in that other field without having to click Save. I didn't have to click save or anything. It was very simple. Good luck!!!

Participating Frequently
October 9, 2008
Thanks for everything Jay...
Inspiring
November 21, 2020

The script is working for me but have one major hickup. When the text gets to the end of the first field and flows to the next, it leaves off one letter. For example say the end of the first field is the word "understood" and the line breaks after "under", it flows to the next field but leaves out the letter "s", so it reads "tood" at the first of the next field.

 

Also, it would be great if it just carried the whole word to the next line instead of breaking it. So in the example above the whole word "understood" would begin within the next field.

 

Any help?

Thom Parker
Community Expert
November 22, 2020

That is correct. The "event.fieldFull" property becomes acitive on the keystroke that overflows the max characters. So if the max is 100, then the 101st character causes the overflow. So if you really want to use this technique the code needs to move the newly entered character into the next field. 

However, and I think this was pointed out in earlier posts on this thread, this technique inherently flawed for many reasons. For example, what happens when the next field already contains text?

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Inspiring
October 9, 2008
Stevan,

You can find some here:

http://www.planetpdf.com/developer/article.asp?ContentID=example_acrobat_javascripts

Also by searching the web or this forum
New Participant
March 21, 2022

This site is no longer active, and takes you to a slots site. 

Bernd Alheit
Community Expert
August 18, 2022

www.planetpdf.com doesn't exist any more.

Participating Frequently
October 9, 2008
Not a problem Jay... I already tested the first two I was given and they did not work. Perhaps I need to get the version 8 or 9. By the way, where does one go to get some of these scripts because I don't remember running into them anywhere in the help files?
Inspiring
October 9, 2008
Stevan,

I have Acrobat 8 and 9, so I'm sorry, but I can't test the script in version 7.
Participating Frequently
October 9, 2008
I will give that a try but all suggestions have not worked and I use Acrobat 7. Thanks for your time Jay...
Inspiring
October 9, 2008
Stevan,

It's almost laughable that I should give instructions since I know very little about JavaScript, but here goes . . .

Be sure to follow George's instruction precisely. Make three text fields, which I'll call Text1, Text2, and Text 3.

1) For the first text field, in the Options tab, remove Multi-line and remove Scroll long text. In the Format tab, in Custom Keystroke Script, click the Edit button, and enter the following:

var t1=this.getField ("Text1");
if (event.fieldFull)
{
getField("Text2").setFocus();
}

2) For the second text field, in the Options tab, remove Multi-line and remove Scroll long text. In the Format tab, in Custom Keystroke Script, click the Edit button, and enter the following:

var t2=this.getField ("Text2");
if (event.fieldFull)
{
getField("Text3").setFocus();
}

Click the Hand tool and start entering text in the first text field. When you run out of space in the first text field it should flow to the second text field and then to the third.

As noted in my previous message of October 7, 8:05, there are some very severe limitations to this technique which I've not been able to overcome. I was hoping that George might have a suggestion to offer about the limitations, but since we haven't heard from him, maybe there are no workarounds for the limitations.
New Participant
July 28, 2009

Jay - You nailed it on Oct 8th '08. I just tried it and it work....but ONLY after I went to the "Appearance" tab and set a font size. I discovered that mine was set to "auto" and that still allowed the text to shrink and not flow. Now it looks to work perfect. Thanks to all for the effort into posting this info! >Robert

Participating Frequently
October 8, 2008
Hi Jay..I tried using your code and it did not work for me. When I came to the end of the text box, the text did not go into the second text field. My other question would be, hwo do you make the text flow from one text box into another if you have many text boxes??

I use Adobe Acrobat 7 Thanks for any help you can offer! George's suggestion did not work for me either.
Inspiring
October 7, 2008
George,

One anomaly I noticed is that if both fields have text and I click in the first field to add text, the new text gets added to the second field -- not where I'm typing. If I select text in the middle of the text in the first field (instead of just clicking an insertion point) and start typing, the selected text is replaced and when I run out of space in the first field the text is added to the second field, but only after skipping over the last part of the text in the first field. In other words, the text is out of order. What is the correct technique to use when adding text?