Move Complete Words to the Next PDF Form Field in Adobe Acrobat
Question details
Keep words from being split when text moves between character-limited PDF form fields.

- Product
- Adobe Acrobat PDF forms
- Device & OS
- not provided
- Scenario
- A PDF form uses JavaScript to advance focus to the next text field when the current field reaches its character limit.
- Observed behavior
- The focus advances at the character limit, which can leave part of a word in each field.
Open the form in Adobe Acrobat and identify the field names, character limits, and existing focus-advance script. Check whether the intended PDF viewer supports Acrobat form JavaScript.
Use a Custom Keystroke Script to Move the Trailing Word
Use this approach when a PDF form must advance between separate text fields without splitting a word at the field limit.
Acrobat does not provide a simple built-in event that determines whether the last word is incomplete. The form needs custom JavaScript to inspect the text and transfer the trailing word before advancing focus.
Without a following space or other boundary, a script cannot always tell whether a word is complete. Moving the final word whenever the field fills is a practical rule, but it may also move a complete word.
In Acrobat, open All tools > Prepare a form, then open each text field's Properties. Note the field names and the character limit under Options.
In the field's Properties, check the Actions and Format tabs for scripts that advance focus. Update the existing logic rather than letting two scripts compete to move focus.
Under Properties > Format, select Custom and edit the Custom Keystroke Script. Before advancing focus, examine the proposed text, find its last word boundary, retain the preceding text in the current field, and place the trailing word in the next named field.
In the script, account for pasted text, selections, existing text in the next field, and words longer than a field's limit. Advance focus to the next field only after the transfer succeeds, and preserve any text that cannot fit.
Exit form editing and type and paste text across the field limit. Test a word at the boundary, a long word, and edits in the middle of existing text to confirm that no characters are lost.

Edit PDFs and Office Documents with WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with PDFs and Office documents. Its format compatibility helps you move existing files into your workflow. It does not replace the custom Acrobat JavaScript needed for this form behavior.

Frequently Asked Questions
Can Acrobat automatically detect an incomplete word at the field limit?
There is no simple built-in event for this. A custom keystroke script can use word boundaries to decide what to transfer, but text without a following boundary may be ambiguous.
Where can I edit a PDF field's keystroke script?
In Acrobat, open All tools > Prepare a form, open the text field's Properties, and select Custom under the Format tab to edit its Custom Keystroke Script.
What happens if a single word is longer than the next field?
The script needs an explicit rule for words that exceed the field limit. For example, it can leave the text in place and notify the user rather than discard characters.
Will the form script work in every PDF viewer?
Not necessarily. PDF viewers support form JavaScript to different degrees, so test typing, pasting, and focus changes in the viewer your recipients will use.




