This solution is based on Dimosthenis Theodoridis’s article on Generating and working with hashes in dynamic PDF forms. Once a user clicks the unlock button and enters a valid password, specific fields become available. The user can then enter information into these fields. To re-lock the fields, the user clicks the button again, but this time does not enter a password.
We had an earlier version, but the secure code & password interface was overly complex for the user.
The original function is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.