How to check if a form has been signed | Community
Skip to main content
New Participant
May 13, 2009
Solved

How to check if a form has been signed

  • May 13, 2009
  • 16 replies
  • 23320 views

I have a workflow which initially checks if the document has been signed or not. However, my functionality doesn't seem to work.

We are using self signed digital signatures to sign PDFs. I would like to know what would be the best way to check if a form has been signed  ?

Thank you in advance.

Aditya

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by

Aditya

I think I may have a solution...

1)  Add a hidden field to store a flag value

2)  Set it's default value to "Not signed" (this way, if the user manually attaches the form with out signing the falg is already set, indicating the signature is missing)

3)  On the "Change" event of the Signature field, add the following JavaScript

var oState = event.target.getField("form1[0].#subform[0].SignatureField1[0]").signatureInfo().status; // Get the current field's signed state.
if (oState == 0) {
    flagField.rawValue = "Not signed";
} else {
    flagField.rawValue = "signed";
}

The above script changes the flag field value to "signed" once the blank signature field is signed (because the Change event is fired).  If the user clears the signature field, the "Change" event is fired again and the flag field value is set back to "Not signed"

4)  Have your workflow process parse the data looking for the flag field value of "signed" or "Not signed" and have the process take the appropriate action based on the flag value.

Regards

Steve

16 replies

New Participant
September 11, 2019

Hi,

Need help on adobe form scenario as i have not worked before.

  1. Follow up action will be configured after digital signature is successfully applied to send the signed pdf to ALL path RECEIVED folder.

is this scenario possible, could you please help

New Participant
August 28, 2021

This is old but to put this out in the ether because I was looking for a solution and found the answer after testing. To save time and not to have invisible fields. The signature box will return a value of <<dict>> so you can just check to see the the signature form returns this value when you check it. If not it's not signed. Well it has worked for me so far fine.

New Participant
November 20, 2017

How know if a document is signed with Delphi?
I've AcroPDF ...
Which property must read?

New Participant
November 30, 2016

Hello,

I have tried one solution for validating signature if it is signed or not, and it worked fine at my end.

Take a textbox control(TextField1) and set invisible. Set this textbox in "Lock fields after signing" for the signature field.

So it will lock(readonly) the textbox if signature field is signed. It will set unlock(open) the textbox if you have not signed or clear the signature.

Now you can check the access property of TextField1. like: if(TextField1.access=="open"), it means signature field is not signed and you can show the message to sign the document.

I had two signature fields in one page and did the same for each signature field. it is working fine.

Regards,

Manoj

Aditya_S_Author
New Participant
May 14, 2009

Genius !! Genius !! Genius !!

Will this event break the Signature ? Is there a way to prevent it ?

I have been looking for this solution over six months now. I really can't thank you enough.

Aditya

Accepted solution
May 14, 2009

Aditya

I think I may have a solution...

1)  Add a hidden field to store a flag value

2)  Set it's default value to "Not signed" (this way, if the user manually attaches the form with out signing the falg is already set, indicating the signature is missing)

3)  On the "Change" event of the Signature field, add the following JavaScript

var oState = event.target.getField("form1[0].#subform[0].SignatureField1[0]").signatureInfo().status; // Get the current field's signed state.
if (oState == 0) {
    flagField.rawValue = "Not signed";
} else {
    flagField.rawValue = "signed";
}

The above script changes the flag field value to "signed" once the blank signature field is signed (because the Change event is fired).  If the user clears the signature field, the "Change" event is fired again and the flag field value is set back to "Not signed"

4)  Have your workflow process parse the data looking for the flag field value of "signed" or "Not signed" and have the process take the appropriate action based on the flag value.

Regards

Steve

Aditya_S_Author
New Participant
May 14, 2009

Steve - The issue is the user is submitting the form by email. I already have included a "submit by email" button which checks the status of the signature and attaches the pdf when successful. The downside to this is that they can save the form and attach it manually.

That's why I would like the workflow to check if the form has been signed. Is there a way to trigger an event in the form on the server side ? This way I can check the status of the signature field.

Aditya

May 14, 2009

Aditya

Is there a specific reason why you want\need the workflow process to check for the signature?

As I stated earlier, I believe the best method is to prevent the submission of the form unless the signature field was signed.  This eliminates the need to set a flag on the form, to have the workflow check for that flag, and prevents the modification of a signed PDF which will affect the status of the digital signature.

Regards

Steve

Aditya_S_Author
New Participant
May 13, 2009

I had one more question. I have created the flag for the signature status however, I am unable to find the correct event to get the status of the signature and save the form without breaking the signature status....

Can you help me with this too ?

As an alternative, is it possible to retreive some kind of hash value ? I am sure the signature field (once signed) leave some kind of value in the form's XML structure ..

Aditya

Aditya_S_Author
New Participant
May 13, 2009

Thank you for your help so far.

Aditya

May 13, 2009

Aditya

The script I showed you is part of the form, so ideally you would prevent the submission of the form unless the signature field was signed as opposed to the workflow process checking for the signature once it receives the form.

To prevent the submission, you could add a regular button to your form along with a "Submit" button.  Hide the real submit button, and add logic to the "regular" button that checks if the signature field is signed, if it is...  execute the "Click" event of the hidden submit button, otherwise do something else (i.e. tell the user to sign the PDF)

The only way the worflow process could check this (assuming you are not using Digital Signatures ES) would be to check some flag value in the form data (like you were trying originally).

Regards

Steve