Copy link to clipboard
Copied
Hello,
I need to make one form field editable by specific people, is there a way to apply a password to one form field in adobe acrobat? I have set up various form fields but the client needs to edit just the terms and conditions each time before sending out. So is there a way for only them to edit this section before sending out. I don't want recipients to be able to also edit the T&Cs. I've read about javascripts but this is going over my head! Or, is there a way to save out a read-only version from reader? I have Adobe Acrobat Pro DC but my client will only have Adobe Reader.
Hope that makes sense!
Copy link to clipboard
Copied
Yes there is, but it's weak security, just meant to keep honest users honest.
Add a password text field. Put code in the validation script for this field that test's the password and enables the other fields if correct. At the end of the script set "event.rc=false", to cause the typed password to be removed.
Copy link to clipboard
Copied
Thanks Thom ![]()
I had a look and guess that I would place the script in the 'run custom validation script' box but do you know what the validation script would be? Also, I only need the one form field password protected, there are others that need to remain open.
Copy link to clipboard
Copied
You don't need a separate field, then. Just use this code as the field's custom validation script:
if (event.value) {
event.rc = (app.response("Please enter the password:","","")=="1234");
}
Copy link to clipboard
Copied
Fields are enabled/disabled with the "field.readOnly" property.
So, here is more complete script for password protecting a field.
This script goes in the Validation Script of the password field
var bEnable = false;
if(event.value)
{
bEnable = (app.response("Please enter the password:","","")=="1234");
}
this.getField("FieldToProtect").readonly = !bEnable;
event.value = false;
Readonly doesn't change the visual appearance of the filed. A more complicated enable/disable scheme for making the field look disabled is outlined here:
https://acrobatusers.com/tutorials/js_disabling_fields
Copy link to clipboard
Copied
If the people you want to be able to edit specific fields will always login with the same user id, it is possible to use the JavaScript identity object to see if the user accessing the PDF form is one of the allowed user ids. This will require a special JavaScript folder be installed on the users's system.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more