Highlighted

Custom Calculations Script Signatures

New Here ,
Oct 07, 2020

Copy link to clipboard

Copied

Good Morning,

 

I am trying to revise a form that was created by a predecessor of mine which uses' many custom calculation scripts that are inter-related as a way of form validation. I am trying to add my own custom calculation script to a box (Box27b) that will require information to be placed into it per our standards. But, once I sign the document (IAOsign) I would like for that information to disappear/redact from the document, while still leaving the many other numours fields inside of the document in its read-only state upon my signature.

TOPICS
Acrobat SDK and JavaScript, General troubleshooting

Views

98

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

Custom Calculations Script Signatures

New Here ,
Oct 07, 2020

Copy link to clipboard

Copied

Good Morning,

 

I am trying to revise a form that was created by a predecessor of mine which uses' many custom calculation scripts that are inter-related as a way of form validation. I am trying to add my own custom calculation script to a box (Box27b) that will require information to be placed into it per our standards. But, once I sign the document (IAOsign) I would like for that information to disappear/redact from the document, while still leaving the many other numours fields inside of the document in its read-only state upon my signature.

TOPICS
Acrobat SDK and JavaScript, General troubleshooting

Views

99

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
Oct 07, 2020 0
Most Valuable Participant ,
Oct 07, 2020

Copy link to clipboard

Copied

Under the Signed event of the Signature field you can add a command to reset this field.

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...
Oct 07, 2020 0
New Here ,
Oct 07, 2020

Copy link to clipboard

Copied

If I were to that there are about 40+ boxes that need to be set to read only along with the signature. The form is currently set with these already 'Checked' if you will to have those fields set to read only.

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...
Oct 07, 2020 0
Adobe Community Professional ,
Oct 07, 2020

Copy link to clipboard

Copied

I don't see the need of redacting  after you sign your portion if you're referring to field objects, not the same as annotations.

 

Adobe Acrobat provides a way to do this with the "Certificate" tool.

 

It allows the creator of the form to certify a document with a certificate-based (or self-signed certificate based digital signature)  with an visible or invisible signature.

 

Certifying a PDF with such signatures makes the entire document read-only and if you choose "Certify" (Invisible Signature) from the Certificate tool there's no need to redact as a second step process using this method.

 

But since you asked that you need to hide certain information and leave other information as read-only after it is signed, then I'm thinking that  you can employ a javascript to take care of that at signing time using a regular digital  signature field.

 

Just keep in mind that redactions deal with the annotations properties, not the the field objects properties. So when you say disappear in the context of annotations, do you mean destroy them or delete them permanently?

 

Redacting will just overlay a color over the annotation that you apply the redacting action (I may be wrong though).

 

If you also need other field objects (not the same as annotations) to appear as redacted you can change the fill color of that field, make them read only, or even hide them.

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...
Oct 07, 2020 0
New Here ,
Oct 07, 2020

Copy link to clipboard

Copied

The reason for the redactin is that the form processes through several departments that need PII to be placed on the form, but when placed into our records amangement system, we need all PII removed from the form. Redaction isn't needed so much as the permanant deletion of the info from the form, but redaction would work for the intent.

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...
Oct 07, 2020 0
Adobe Community Professional ,
Oct 07, 2020

Copy link to clipboard

Copied

In that case I don't see any issue implementing a javascript. But my main question is with the PII information. 

 

Are the PII's in the form of annotations (or comments) or are the PII's typed in throughout the form in text field objects, selected items in dropdown menus or list boxes, for example?

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...
Oct 07, 2020 0
New Here ,
Oct 07, 2020

Copy link to clipboard

Copied

The PII will be Typed in Info in only that one block.

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...
Oct 07, 2020 0
ls_rbls LATEST
Adobe Community Professional ,
Oct 09, 2020

Copy link to clipboard

Copied

Then in that case, as Try67 mentioned,  you can add a javascript action event to occur at signing time and reset the PII field to a null or blank value.

 

The steps below are redundant to this topic since you already mentioned that youhave over 40 fields checked as read-only. But for the benefit of other community memebers who may be struggling with a similar "How-to', here are the steps:

 

  1. With your document opened in Adobe Acrobat Pro, select the "Prepare Form" tool. 
  2. Then right-click on the (IAOsign) signature field and select "Properties" from the context menu. The filed properties dialogue box will open up. 
  3. Go to the "Sign" tab. Select which fields you want to make read-only after the digital signature is applied... to include the (Box27b)  text field that contains the PII input data (you already did this part) And you already occupied this event on this portion of the signature events section. So you need to add an action.  
  4. To do so,  go to the "Action" tab and select a mouse-up action--->> then javascript.

 

  • Following Try67's suggestion, something like this should work for you: 

 

 

this.resetForm(["Box27b"]);

 

 

Alternatively, in addition  to the steps above, if you need the PII field data to remain visible the document is signed, I add an additional custom calculated script in the dependent text field (in your case this would be the PII text field (Box27b)  :

 

 

/* in the PII text field (Box27b) field properties dialogue box go to the "Calculate" tab
and select "Custom Calculation Scrfipt". Add the following line:  */

if (this.getField("IAOsign").value =="") event.value ="";

 

 

This script will ensure that when you clear the digital signature in the (IAOsign) signature block , whatever data is in  (Box27b) will set this field with a null (or blank , if you may) value.

 

And again, there are many ways to accomplish little things like this with Acrobat JavaScript. This is what works for me in my PDFs with my current beginner level  of scripting.

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...
Oct 09, 2020 0