'Acrobat Forms - Connecting Fields

Goal: JavaScript code to link fields to auto fill once top field is full. Lines will range from 2 to 5 (have multiple areas with different total number of lines in each.)

Want to be able to have lines visible. Acrobat's current option for multiple lines auto sizes text and line spacing to fit, so visible lines don't work. User currently has to recognize that field is filling (type is auto sizing to fit) then physically move cursor down to next line.

Example (link below): Comments: Would like this area to auto fill across top line then automatically jump to next line to continue comments.

I work with Acrobat a lot but have very little knowledge of writing JavaScript code. Any help will be greatly appreciated.

enter image description here



Solution 1:[1]

You have a few options:

  1. Do not care about the writing lines, and use the font size/line spacing provided by the multiline field.
  2. Use the richText feature of the field.
  3. Work with individual connected fields on the writing lines.

To 3: (I go backwards with these comments): Looking like the simplest solution. However, the crucial property is only available in the Keystroke event, which means it does not work when you fill the fields via script or prefill.

To 2: You can preset the properties of the field for manual filling. For filling via script, you would have to create a richText Object. This is not thaaat difficult, but can be a bit complicated.

To 1: This is the easiest way, and, because filling out on screen or via script does not need writing lines; so, you can make the background of the multiline field white and cover the writing lines.

If ever possible, I would go for option 1.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Max Wyss