How to Lock and Unlock PDF Form Fields for Different Users
Question details
The user needs a method to restrict certain fields in a fillable PDF form so that general users cannot edit them, but authorized personnel (such as HR staff) can unlock and complete them later.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- A multi-step form filling workflow where general users and HR staff must fill out different sections of the same PDF document at different times.
- Observed behavior
- General users require access to initial fields while HR-specific fields must remain read-only. Authorized staff then need a way to make the HR fields editable to complete the document.
Ensure you have finalized the layout of your fillable PDF form and identified exactly which fields need to be restricted to authorized staff before applying scripts or locking mechanisms.
Use JavaScript to Toggle Field Read-Only Status
You can use a script to set a specific group of HR fields to read-only for general users, and use a separate, restricted script to unlock them for authorized staff.
This method involves grouping the fields that need protection and using PDF document-level JavaScript to control their editable state based on who is opening the file.
Open the PDF form in your PDF editing software, enter form editing mode, and name the HR-specific fields with a consistent prefix (e.g., 'HR_').
Add a document-level JavaScript that automatically sets all fields with the 'HR_' prefix to 'read-only' when the document is opened.
Write a separate script to change the fields' status back to editable. Store this script outside the main document (e.g., on a secure HR local drive) or trigger it via a hidden button that requires a password.

Implement a Sequential Fill and Sign Workflow
For simpler forms, using an e-signature or Fill & Sign workflow can automatically manage who fills out which fields at what stage without needing complex scripts.
Create and Manage Fillable PDF Forms with WPS Office
WPS Office provides a comprehensive PDF editor that allows you to create fillable forms, manage text fields, and secure your documents with ease. It is a lightweight and powerful solution for managing business workflows.
- 1. Open the PDF: Download and install WPS Office, then open your PDF document in the WPS PDF Editor.
- 2. Manage Form Fields: Navigate to the 'Form' tab to add or edit text fields, checkboxes, and drop-down menus.
- 3. Set Permissions: Use the 'Protect' tab to apply document restrictions, set passwords, and manage user editing permissions.

Frequently Asked Questions
Can I lock a PDF form after it has been signed?
Yes, most PDF editors and e-signature tools have an option to flatten the document or lock all fields automatically once a digital signature is applied to prevent further changes.
How do I make specific fields read-only without coding?
In form editing mode, you can right-click a specific field, open its Properties, and check the 'Read-Only' box. However, this is a permanent setting for all users unless manually unchecked by someone with form editing software.
What is the difference between flattening a PDF and making fields read-only?
Making fields read-only keeps them as interactive form elements that simply cannot be typed into. Flattening a PDF merges the form field content permanently into the document's background image, removing all interactivity completely.




