How to Move Text Between Multiline Form Fields in PDF with JavaScript
Question details
The user needs to automatically flow text from one multiline PDF form field to the next without breaking words when the current field becomes full.

- Product
- Adobe Acrobat Pro
- Device & OS
- not provided
- Scenario
- Typing a long narrative into a PDF form that uses multiple distinct text fields with a fixed 24-point Helvetica font.
- Observed behavior
- Text stops at the end of the field. The user wants to detect when the field is full and automatically transfer focus and the active word to the next multiline text field.
Ensure you have access to a PDF editor with advanced JavaScript support, and identify the exact field names of your multiline text fields before scripting.
Use Keystroke Event and event.fieldFull Property
Write custom JavaScript using the uncommitted Keystroke event to detect when the field reaches capacity and safely transfer the active word.
The Acrobat scripting model does not provide a perfect built-in text reflow feature for separate fields. You can use the event.fieldFull property to detect forward movement limits.
Simply setting focus to the next field isn't enough, as the active word being typed might break or be overwritten by the user's immediate next keystroke. The script must temporarily store the active word, change the focus, and place the text carefully.
Open your PDF form in Adobe Acrobat Pro and enter 'Prepare Form' or Form Editing mode.
Right-click the first multiline text field, select 'Properties', and navigate to the 'Format' or 'Custom Actions' tab.
Insert a custom Keystroke script that monitors the uncommitted Keystroke event using the 'event.fieldFull' property.
Include custom JavaScript logic to capture the currently typed word, move the focus to the next field using 'getField("TargetFieldName").setFocus()', and apply the stored text securely into the new field using the user's first keystroke in the new field.

Display a Warning Alert When the Field is Full
A simpler alternative to complex text transfer scripts is to trigger an alert notifying the user to manually click into the next narrative field.
Edit and Manage PDF Forms Easily with WPS Office
WPS Office provides a comprehensive PDF editor that allows you to create, edit, and fill out interactive PDF forms seamlessly. It's a lightweight, easy-to-use application for handling all your document needs.
- 1. Launch WPS PDF: Open WPS Office and click on the 'PDF' tab to access the dedicated PDF editor.
- 2. Open the Form Tab: Open your target PDF document and navigate to the 'Form' tab on the top ribbon to view all interactive fields.
- 3. Manage Text Fields: Use the 'Text Field' tool to insert new multiline text boxes, or right-click existing ones to adjust their properties and formatting.
- 4. Save and Export: Save your finalized document or export it directly to seamlessly share your interactive PDF form with others.

Frequently Asked Questions
Why does text split in the middle of a word when moving fields in a PDF?
Standard PDF multiline fields do not automatically reflow text to external fields. When the capacity limit is reached, standard forward movement scripts trigger instantly on the final keystroke, leaving partial words behind unless custom JavaScript is written to catch and move the entire active word.
What is the event.fieldFull property in PDF JavaScript?
The event.fieldFull property is used during uncommitted Keystroke events in Acrobat JavaScript to detect if a specific text field has reached its maximum physical capacity or character limit.
Can I link multiline text fields to flow text automatically without JavaScript?
No, standard PDF form files do not natively support automatic text threading or flowing between separate text fields without using custom JavaScript. For extremely long narratives, it is often recommended to attach a separate Word document or use a single expanding text field instead.




