• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
4

How to LINK two or more Text Field

Explorer ,
Sep 29, 2008 Sep 29, 2008

Copy link to clipboard

Copied

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 :)
TOPICS
PDF forms

Views

98.0K

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
community guidelines
Explorer ,
Oct 08, 2008 Oct 08, 2008

Copy link to clipboard

Copied

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.

Votes

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
community guidelines
Enthusiast ,
Oct 08, 2008 Oct 08, 2008

Copy link to clipboard

Copied

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.

Votes

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
community guidelines
Community Beginner ,
Jul 27, 2009 Jul 27, 2009

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Explorer ,
Oct 08, 2008 Oct 08, 2008

Copy link to clipboard

Copied

I will give that a try but all suggestions have not worked and I use Acrobat 7. Thanks for your time Jay...

Votes

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
community guidelines
Enthusiast ,
Oct 08, 2008 Oct 08, 2008

Copy link to clipboard

Copied

Stevan,

I have Acrobat 8 and 9, so I'm sorry, but I can't test the script in version 7.

Votes

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
community guidelines
Explorer ,
Oct 08, 2008 Oct 08, 2008

Copy link to clipboard

Copied

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?

Votes

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
community guidelines
Enthusiast ,
Oct 08, 2008 Oct 08, 2008

Copy link to clipboard

Copied

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

Votes

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
community guidelines
New Here ,
Mar 21, 2022 Mar 21, 2022

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Community Expert ,
Aug 18, 2022 Aug 18, 2022

Copy link to clipboard

Copied

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

Votes

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
community guidelines
Explorer ,
Oct 09, 2008 Oct 09, 2008

Copy link to clipboard

Copied

Thanks for everything Jay...

Votes

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
community guidelines
Community Beginner ,
Nov 21, 2020 Nov 21, 2020

Copy link to clipboard

Copied

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?

Votes

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
community guidelines
Community Expert ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

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 PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

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
community guidelines
New Here ,
Feb 02, 2021 Feb 02, 2021

Copy link to clipboard

Copied

I have been able use the discussed script without any issue when typing the data into the first box.I do have a challenge when I attempt to copy the text into the first text box. The text simply stops in the first text box and i noticed that my curser is active in the second text box. There is not text in the second box.

 

Both of my text fields have a set font size, not auto, & scroll long text disabled.

 

Any suggestions? Thank you for your time.

Mari

Votes

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
community guidelines
Community Expert ,
Feb 02, 2021 Feb 02, 2021

Copy link to clipboard

Copied

Correct. Have you examined the relevant event properties to see their state?  

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

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
community guidelines
New Here ,
Feb 03, 2021 Feb 03, 2021

Copy link to clipboard

Copied

Thom:

I am unsure what you are asking of me.

 

  • I have no errors or other messages in the console.
  • I looked on your site and was unable to locate an article. i was searching under event properities
  • I have checked my other resources to no avail.

Could you give me a tad more guidance please?

 

Thanks, Mari

Votes

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
community guidelines
Explorer ,
Sep 28, 2023 Sep 28, 2023

Copy link to clipboard

Copied

Are you still here Still Here? (Sorry, I just had to).

Did you find a fix for your problem. I'm stuck with this same issue.

Votes

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
community guidelines
Community Expert ,
Sep 28, 2023 Sep 28, 2023

Copy link to clipboard

Copied

The solution to the posted issue was already solved, so explain the specific issue you are trying to solve that is different from what's already been discussed.

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

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
community guidelines
Explorer ,
Sep 28, 2023 Sep 28, 2023

Copy link to clipboard

Copied

I was asking "Still Here" if there was a fix for the cut letter at the end.

Example: Understood

Field 1: Under

Field 2: tood

Votes

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
community guidelines
Community Expert ,
Sep 28, 2023 Sep 28, 2023

Copy link to clipboard

Copied

Yes there is, and it's not news. This solution and it's problems have been known for over 20 years. 

The final character that didn't get entered is in event.change.  Unless the user pasted text too long for the field, then I think the extra text is in event.changeEx. But you'd need to experiment with it to nail this down. Haven't looked at it in a long time because I think it's a losing solution. What's presented here only works when the user is typing in text for the first time. It all falls apart if the the user make changes in the first text field. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

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
community guidelines
New Here ,
May 23, 2023 May 23, 2023

Copy link to clipboard

Copied

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 ...

 

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!!!

Votes

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
community guidelines