How to Make PDF Form Fields Read-Only After Section Completion
Question details
The user needs a method to automatically lock specific sections of a PDF form so they become read-only after the assigned person completes their part and checks a confirmation box.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Managing a multi-person PDF workflow where each individual's completed section must be locked against further edits once confirmed.
- Observed behavior
- Currently, form fields remain editable after completion, and a mechanism is required to change their state to read-only dynamically.
Ensure you are using a professional PDF editor that supports JavaScript execution or digital signature properties, and always create a backup copy of your original PDF form before adding scripts.
Use JavaScript on Checkbox MouseUp Event
Add a short JavaScript code to a confirmation checkbox that triggers the targeted form fields to become read-only when checked.
This method is ideal for forms where users simply need to check a box to confirm completion. It dynamically targets specific field names and changes their properties without requiring a digital ID.
Open your PDF form in edit mode, right-click the confirmation checkbox, and select 'Properties'.
Navigate to the 'Actions' tab. Choose 'Mouse Up' from the Select Trigger dropdown menu, and select 'Run a JavaScript' from the Select Action dropdown.
Click 'Add' and enter the following script: this.getField("FieldA").readonly = true; (Replace "FieldA" with the actual name of your target field).
If you need to lock multiple fields, simply duplicate the script line for each field name. Include the checkbox's own field name if you want to prevent users from unchecking it later.

Use Digital Signatures for Stronger Security
Configure a digital signature field to automatically lock associated fields upon signing, providing cryptographic security.
Manage PDF Workflows and Forms with WPS Office
WPS Office provides a comprehensive PDF editor that allows you to easily create interactive forms, add digital signatures, and secure document workflows without complicated setups.
- 1. Open the PDF: Launch WPS Office and open your existing PDF form.
- 2. Edit Form Fields: Navigate to the 'Form' tab to insert or adjust checkboxes and text fields as needed.
- 3. Add Signatures: Switch to the 'Protect' tab to implement digital signatures for locking sections securely.
- 4. Save and Share: Save your newly configured PDF and distribute it to your team for the workflow.

Frequently Asked Questions
Can I unlock the fields if someone makes a mistake?
If the fields are locked via JavaScript, you would need an administrative 'Reset' button programmed with a script to set the readonly property to false. If locked via a digital signature, the signer must right-click their signature and choose 'Clear Signature' to unlock the linked fields.
Why isn't the JavaScript working on some devices?
Not all PDF readers support JavaScript execution. Browser-based PDF viewers or mobile device readers often disable scripts for security reasons. For broad compatibility across all devices, using digital signatures is the most reliable method.
How do I lock the entire PDF document instead of just one section?
If you want to lock everything, you can adjust the digital signature properties to 'Mark as read-only: All fields'. Alternatively, you can export or print the completed document to a flattened PDF format, which removes all interactive fields entirely.




