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

Adding a continuation form field line in Adobe Acrobat Standand

Community Beginner ,
Mar 10, 2020 Mar 10, 2020

I deal with a lot of "Legal" type forms that sometimes need a form field to continue from one line to the next line. Below is an example:

 

This is an Agreement with an Effective Date of March 10, 2020, and is between "The really long company name for this example" and "Second company name".

 

I inserted the following JavaScript that does flow over to the second line, but skips a character. So if I set the first form field to be 20 characters long, when it hits the 20 characters the 21st character goes missing but then the second form field starts at character number 22.

 

var x=this.getField ("234 Limited Liability Company1");

if (event.fieldFull) {
getField("234 Limited Liability Company2").setFocus();
}

Is there a way no to skip a character?

TOPICS
General troubleshooting
378
Translate
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 ,
Mar 11, 2020 Mar 11, 2020
LATEST

Try this code as the custom Keystroke script of the first field:

 

 

if (AFMergeChange(event).length>=event.target.charLimit) {
	this.getField("234 Limited Liability Company2").setFocus();
}

 

It's likely that the code will "disappear" once you enter it. That's fine. It should still work.

Note that while this method works better than what you had, it is still somewhat flawed.

 

Edit: Keystroke, not Format...

Translate
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