How to Automatically Continue PDF Text Entry in the Next Field
Question details
The user needs text entered into a PDF form field to automatically flow into a designated next field once the character limit of the first field is reached.

- Product
- PDF Editors
- Device & OS
- not provided
- Scenario
- Creating fillable PDF forms with restricted space where text needs to seamlessly jump to the next line or field without user intervention.
- Observed behavior
- Without proper scripting, text either stops at the boundary, scrolls indefinitely, or drops the final character when focus manually shifts to the next field.
Ensure you are using a PDF editor that supports JavaScript for form fields, and verify the exact field names for the fields you want to link together.
Apply a Custom Keystroke Script
Use JavaScript to detect when the current field is full and automatically move the cursor to the next field.
To ensure text flows seamlessly without dropping the last character, you need to rely on the 'event.fieldFull' property combined with 'setFocus()'. You also need to explicitly restrict the character count of the first field.
Open your PDF form in editing mode, right-click the first text field, and select 'Properties'.
Go to the 'Options' tab, uncheck 'Scroll long text', and check 'Limit of [X] characters' to define exactly when the field should be considered full.
Switch to the 'Format' tab, select 'Custom' from the Select format category drop-down menu.
In the Custom Keystroke Script box, enter: if (event.fieldFull) getField("NAME OF NEXT LINE").setFocus(); (Replace "NAME OF NEXT LINE" with the exact name of your second text field).
Click 'Close' and test the form to ensure text drops to the next field seamlessly when the limit is reached.

Easily Manage and Fill PDF Forms with WPS Office
WPS Office provides a comprehensive suite of PDF tools, allowing you to easily create, edit, fill, and manage interactive PDF forms without a steep learning curve.
- 1. Open PDF File: Launch WPS Office and open your fillable PDF form document.
- 2. Access Form Tools: Navigate to the 'Form' tab on the top ribbon to access various form field tools and editing options.
- 3. Edit Text Fields: Use the 'Text Field' option to insert new text boxes or right-click existing ones to manage their basic properties.
- 4. Save Changes: Save your document securely to ensure all form functions and filled data are preserved.

Frequently Asked Questions
Why is the last character omitted when the PDF field changes focus?
This usually happens if a custom script triggers the focus change before the final keystroke is fully processed by the application. Using the built-in `event.fieldFull` property specifically handles this timing issue so no characters are lost.
Do I need to turn off scrolling for the auto-continue to work?
Yes. If 'Scroll long text' is enabled in the field's Options properties, the field will never technically be considered 'full' because the text will just scroll out of view indefinitely. Disabling it forces a hard limit.
Can I link drop-down menus using a similar method?
Yes, you can use a custom validation script to check the value of a drop-down menu and automatically populate another text field or drop-down based on the selected choice (e.g., selecting 'ID 12345' populates 'Joe Bloggs' in another field).




