how make all the fields read only if it has data with document action "document will save"

New Here ,
Jun 23, 2020

Copy link to clipboard

Copied

sorry if this question  is a repeated one. 

I am trying to make all the fields read only which has data when i try to save the pdf documnet. 

TOPICS
Acrobat SDK and JavaScript, PDF forms

Views

134

Likes

Translate

Translate

Report

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

how make all the fields read only if it has data with document action "document will save"

New Here ,
Jun 23, 2020

Copy link to clipboard

Copied

sorry if this question  is a repeated one. 

I am trying to make all the fields read only which has data when i try to save the pdf documnet. 

TOPICS
Acrobat SDK and JavaScript, PDF forms

Views

135

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 23, 2020 2
Adobe Employee ,
Jun 24, 2020

Copy link to clipboard

Copied

Hey there,

 

Even if this has been asked before, we'd be happy to answer again.

If you are the creator/owner of form and working with Acrobat DC, then you can make the changes in PDF form's properties and set its form fields as read only.

Open PDF forms in Acrobat DC>right click on form field>Properties>General>Read-only>Close

For detailed information, please refer to this help article: https://helpx.adobe.com/acrobat/using/pdf-form-field-properties.html#general_tab_for_form_field_prop...

 

Thanks,

Akanchha

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 24, 2020 2
New Here ,
Jun 24, 2020

Copy link to clipboard

Copied

i want make the field read only when a person fills up the form and save it, and that too only the fileds that has been filled. 

regards

fyzi

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 24, 2020 2
Adobe Employee ,
Jun 25, 2020

Copy link to clipboard

Copied

Thanks for sharing more details.

Try the further suggestion given by expert and let us know if that helps.

 

Thanks,

Akanchha

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 25, 2020 0
Adobe Community Professional ,
Jun 24, 2020

Copy link to clipboard

Copied

Use this line for each field to be locked:

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

 

You should place this script in a button action, not in a "Doc will save" event.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 24, 2020 2
Adobe Community Professional ,
Jun 26, 2020

Copy link to clipboard

Copied

Check the values of hte fields. When the field is not empty set the property readonly.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 26, 2020 0