Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

field getLock/setLock API

Community Beginner ,
Jun 22, 2021 Jun 22, 2021

hi,

 

how do you use these 2 methods of the Field object , getLock & setLock? there's no example in the API reference and also couldn't find useful information on google.

 

thanks.

TOPICS
Acrobat SDK and JavaScript
506
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 22, 2021 Jun 22, 2021

It's a simple getter and setter for a Lock object, used with signature fields. There's a description of the properties of this object under the setLock method. It basically allows you to lock specific fields when the signature is applied.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 22, 2021 Jun 22, 2021

some code please?

 

I'd like to see examples of how all those params are used.

 

thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 23, 2021 Jun 23, 2021

What do you find unclear in the documentation? You need to be able to use the documentation as your primary source. Instead of asking us to write code for you why not tell us your requirement, and share your code as far as you can go. Say what you expect to happen, and what actually happens, including console messages? I think you will learn much more that way than from us creating samples for you to copy. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 23, 2021 Jun 23, 2021

I agree with TSN, but here's a sample of how to use it to set a signature field to lock two fields when signed:

 

this.getField("Signature1").setLock({action: "Include", fields: ["Text2", "Text4"]});

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 23, 2021 Jun 23, 2021
LATEST

You can change the properties of a signature field and use getLock of this field.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines