Anyone ever figure out a solution for this issue? I too am looking for a digital signature consisting of the user's initials rather than the large digital signature block.
bsabourin1962 you mentioned you were a designer for the army. As a prior service member myself I can only assume this was in preparation of the form conversion from .xfdl to fillable .pdfs . Has your organization found a workaround for this?
How did you get it to just pull CAC? Right now its just pulling my creds from the computer and not my CAC creds.
1 person found this helpful
I'm an app developer and someone in my chain of command showed me an eval form (A7222_1.pdf) that had this initials feature. Unfortunately, that form was locked, so couldn't look at the code.
I spent some time evaluating how that form worked and recreated the functionality, and here's how to do it.
1) Add a small signature block field and call it something like Signature1.
2) Add a text field next to it called txtInitials1. Add another text field called txtDebugOut.
3) Used the Select Object Tool (Tools -> Advanced Editing ->Select Object Tool), right click and select properties. and click on the Signature1 signature field. Under Signed -> check the "This script executes when field is signed." radio button.
4) Click Edit and add the following script:
Cut and paste the same code into there.
6) The code will parse the subjectCN of the certificate. It assumes the format is LastName.FirstName.MiddleName.EDIPINumber.
7) If you want to create additional initial fields, then repeat from step 1, but call the fields Signature2 and txtInitials2. Edit the code and replace Signature1 and txtInitials1 with Signature2 and txtInitials2, respectively.
This did exactly what you said. However, I adjusted mine a little bit to do exactly what I wanted. Basically I edited yours to just print the first and last name when signed. I also added a date field. The date field is currently filled with "util.printd" I would like to set it up the same way the signature/name is set up. I'm not as well versed and don't know how to script it to get date signed and to also validate it. So when signature is cleared, the date field is cleared. I just need help doing date and validation for date.This is my edited version.
var txtInitials1=this.getField("Signer's Name");
//app.alert("signed: " + sigInfo);
for (var propertyName in sigInfo.value)
output+=propertyName + ": " + sigInfo.value[propertyName] + "\r\n";
output+=propertyName + ":" + "Error: "+e.message + "\r\n";
if(sigInfo.certificates.length>0 && !(typeof sigInfo.certificates.subjectCN=="undefined"))
output+= "subjectCN=" + cert.subjectCN+"\r\n";
if (iniArray.length >=2)
if (iniArray.length >2 && isNaN(iniArray))
var f = this.getField("Date");
f.value = util.printd("dd mmm yyyy", new Date());
output+="Initials: " + strInitials + "\r\n";
output+="Error: " + e.message+"\r\n";