Copy link to clipboard
Copied
Hi there,
I made a document for a client with one text field that is editable.
I would like for them to be able to
I have read about folks turning off the individual preference for blue highlights, but that only works on the current user's acrobat, not universally. And then I read about a script that would make it work, but potentially only on acrobat pro versions? Will it not work with reader or if people are using another view, like in a browser?
I have read about folks using the fill and sign to make the form read-only, but I tried it on reader and it wanted me to sign in to make an adobe account. I was hoping there was a painless way for my client to make the form read-only?
Thanks in advance!
Copy link to clipboard
Copied
You can use this code (I assumed the field is named "Name"), under Tools - JavaScript - Set Document Actions - Document Will Save:
if (this.getField("Name").readonly==false && app.alert("Do you wish to make the Name field read-only?",2,2)==4) this.getField("Name").readonly = true;
Copy link to clipboard
Copied
Set the field as read-only. In Prepare Form mode right-click the field, select Properties and tick the Read Only check-box under the General tab.
Copy link to clipboard
Copied
Hi try67, Thank you for this, but I should have specified that the client only has Acrobat Reader, not Acrobat Pro.
Copy link to clipboard
Copied
Do you want the client themselves to make the field read-only?
If so, you can add a button to your file that will do that when clicked (using a simple script).
It will work on both Acrobat and Reader, but there's no guarantee it will work in any other PDF viewer.
Copy link to clipboard
Copied
Thanks again for replying. I'd be interested if it didn't involve a button. Basically this document is a cover page and the field is just one line where the client can add their employee name. Then they will use it in proposals. I don't want it to look like a form at all. The form was just to allow them one editable text field in the document.
Copy link to clipboard
Copied
So what should be the trigger for it?
Copy link to clipboard
Copied
Each employee will fill in their name in the field, and then they need to be able to make a read-only copy. I was hoping there would be a save-as read-only function in Acrobat Reader they could use for this.
Copy link to clipboard
Copied
There isn't. They can achieve it by digitally signing the file, or it can be done by a script, but something must trigger it.
You can add a script to the document's Will Save event, for example, that will either make the field read-only automatically, or ask them if they want to do it first, and then do it.
Copy link to clipboard
Copied
Sure. I'll add the script. Do you mind pointing me to where I could find the script to the will save event?
Copy link to clipboard
Copied
You can use this code (I assumed the field is named "Name"), under Tools - JavaScript - Set Document Actions - Document Will Save:
if (this.getField("Name").readonly==false && app.alert("Do you wish to make the Name field read-only?",2,2)==4) this.getField("Name").readonly = true;
Copy link to clipboard
Copied
Thank you, I have never used a script before but I will try it and report back.
Copy link to clipboard
Copied
Thank you so much try67. Worked perfectly! I really appreciate your help with this.
Copy link to clipboard
Copied
Hi @try67 I'm using this script again, but I have two fields this time. Is it still possible to add the script? I would be fine if both fields became read-only. There will never be an instance where just one will need to be read-only. Thanks in advance.
Copy link to clipboard
Copied
Sure, you can apply it to as many fields as you want, like this:
if (this.getField("Name").readonly==false && app.alert("Do you wish to make the Name field read-only?",2,2)==4) {
this.getField("Name").readonly = true;
this.getField("Name2").readonly = true;
this.getField("Name3").readonly = true;
this.getField("Name4").readonly = true;
}
Copy link to clipboard
Copied
Awesome. Thank you so much!