Populate Combined PDF Form Fields into an Editable Multiline Text Box
Question details
The user needs to automatically copy data from multiple source fields into a single multiline text box, but the destination text box must remain unlocked for manual user edits.

- Product
- Device & OS
- not provided
- Scenario
- Creating a dynamic PDF form where combined field data is generated automatically but requires manual review and corrections before submission.
- Observed behavior
- Standard calculation scripts applied to the destination field lock it automatically, preventing users from making manual edits to the populated text.
Ensure your PDF editing software supports form field creation and custom JavaScript execution on desktop applications.
Use Custom JavaScript on Source Fields' On-Blur Event
Assign a custom script to the source fields instead of using a calculation script on the destination field to prevent the target box from locking.
Standard calculation scripts applied directly to a destination field will automatically lock it, preventing further user edits. By attaching a custom JavaScript to the On-Blur or Format event of the source fields instead, you can dynamically update the multiline text box while keeping it unlocked for manual corrections.
Open your PDF form in edit mode and locate the source text fields you want to combine.
Right-click the first source form field, select 'Properties', and navigate to the 'Actions' or 'Format' tab.
Select the 'On Blur' trigger (or Custom Keystroke Script) so the script runs when the user leaves the field.
Add a custom JavaScript action to retrieve the values from the source fields, combine them, and set the value of the target multiline text box.
Apply the same script to any other source fields that contribute to the final combined text box to ensure it updates no matter which field is edited.

Edit and Manage PDF Forms Easily with WPS Office
WPS Office provides robust PDF editing tools, allowing you to insert form fields, edit text, and manage interactive PDFs effortlessly on your desktop.
- 1. Open PDF in WPS Office: Launch WPS Office and open your PDF document.
- 2. Navigate to Form Tools: Click on the 'Form' tab located on the top ribbon.
- 3. Add Form Fields: Use the provided tools to insert text fields, checkboxes, or multiline text boxes.
- 4. Configure Properties: Double-click any field to access its properties, change formatting, and manage field names.

Frequently Asked Questions
Why is my combined PDF text box locked from editing?
When you use a built-in calculation script on a destination field, the PDF reader automatically locks the field so the calculation cannot be overwritten by manual typing. Using an On-Blur script on the source fields bypasses this limitation.
How do I create a multiline text box in a PDF?
In the text field properties of most PDF editors, including WPS PDF, you can go to the 'Options' tab and check the 'Multi-line' box. This allows text to wrap across multiple lines instead of scrolling horizontally.
Do custom JavaScripts work on mobile PDF readers?
JavaScript support is typically limited or unavailable on most mobile PDF viewers. It is highly recommended to fill out and test script-heavy PDF forms on a desktop application to ensure scripts run correctly.




