Skip to main content
Participant
February 6, 2024
Answered

lock form fields for different users

  • February 6, 2024
  • 2 replies
  • 1145 views

Hello,

I'm creating an document where User A (the company) needs to fill in form fields that User B (the customer) is not allowed to change.

I figured out that when User A signs the document with his signature, the linked form fields lock. This is actually a solution i needed, but it needs to be a signed signature and not a name and contact information i need to fill in for it to work. Also the customers, and possibly the company too,  don't have Adobe Acrobat. So i don't know if that will lock it in the right way.

A different idea was to lock specific form fields with a password. That would be the easiest way i think. But i can't seem to find that out.

 

How can i make sure User A can lock some fields that User B can't Access? I have almost no knowlegde of Javascript.

This topic has been closed for replies.
Correct answer stefan29028587

I found it!

For anyone with the same question in the future:


I created a button with a Javascript command:
this.getField("Name1").readonly = true;

this.getField("Name2").readonly = true;

this.getField("Name3").readonly = true;

When i press the button, it sets the chosen fields on read only.

 

After that i create a new rule that "on click" the button also disappears so the customer wont see it.

 

If you need a way to undo this, just create a new button and copy the same code, but change all the "true" to "false". 

2 replies

stefan29028587AuthorCorrect answer
Participant
February 6, 2024

I found it!

For anyone with the same question in the future:


I created a button with a Javascript command:
this.getField("Name1").readonly = true;

this.getField("Name2").readonly = true;

this.getField("Name3").readonly = true;

When i press the button, it sets the chosen fields on read only.

 

After that i create a new rule that "on click" the button also disappears so the customer wont see it.

 

If you need a way to undo this, just create a new button and copy the same code, but change all the "true" to "false". 

JR Boulay
Community Expert
Community Expert
February 6, 2024

The usual method is to lock the fields concerned. If you need to do this with Acrobat Reader, you can use a bookmark or a button.

Acrobate du PDF, InDesigner et Photoshopographe