Extracting from ls_rbls - this is what worked perfectly for me.
When signed, the document fills out a date stamp next to it automatically.
Insert Text Box next to Signature > Right-click the Text Box > Properties > mark Read Only and close.
Script: Right-click the Signature > Properties > Signed > Edit > Paste the following:
var f = event.target;
var sigInfo = f.signatureInfo();
this.getField("Text34").value = util.printd("yyyymmdd", new Date((util.scand("ddd mmm dd yyyy HH:MM:ss ZZ", sigInfo.date ))));
if (f.signatureValidate()==4);
... but ... Hahah.
If I remove the signature, how do I delete the data without changing the box to NOT be Read-Only.
Great!
And thank you for sharing this.
To clear the contents of the date field when the signature field is cleared, you may use a custom validation script or custom calculation script executed directly from the date field.
Something like this:
if(this.getField("mySignatureField").value == "") event.value = "";
OR,
You may also add a Mouse Exit event to the signature field:
if(event.target.value =="") this.getField("Text34").value = "";
}
With the latter script, when the signature field is cleared and the mouse pointer is moved outside of that field it will set the date field to a blank value.