Script to capture who digitally signed the form

Avatar

Avatar

DKinsley

Avatar

DKinsley

DKinsley

02-10-2017

Is it possible to access the name of the person who digitally signed a LiveCycle form so I can also save that information to the database?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

radzmar

MVP

Avatar

radzmar

MVP

radzmar
MVP

05-10-2017

You can read those information from the signatureInfo() object.

event.target.getField("form1[0].#subform[0].Signature[0]").signatureInfo().name;

Answers (7)

Answers (7)

Avatar

Avatar

DKinsley

Avatar

DKinsley

DKinsley

09-10-2017

radzmar,

That script works perfect!

Thanks so much!

-Don

Avatar

Avatar

radzmar

MVP

Avatar

radzmar

MVP

radzmar
MVP

08-10-2017

Ok, you'll have to change the regular expression a bit.

event.target.getField("form1[0].#subform[0].Signature[0]").signatureInfo().name.replace(/<*(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})).+/, "");

Avatar

Avatar

DKinsley

Avatar

DKinsley

DKinsley

06-10-2017

Sorry, I had to leave last night.

The original string was:

Bob Smith <bsmith@tactair.com> (Bob Smith)

Avatar

Avatar

radzmar

MVP

Avatar

radzmar

MVP

radzmar
MVP

05-10-2017

Sorry, that doesn't tell me anything.

What was original string?

Avatar

Avatar

DKinsley

Avatar

DKinsley

DKinsley

05-10-2017

This is what I get...

Firstname LastName <> (FirstName LastName)

Avatar

Avatar

radzmar

MVP

Avatar

radzmar

MVP

radzmar
MVP

05-10-2017

No, but since this is just a string you can use javascript methods to extract the desired information.

event.target.getField("form1[0].#subform[0].Signature[0]").signatureInfo().name.replace(/(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/, "");

Avatar

Avatar

DKinsley

Avatar

DKinsley

DKinsley

05-10-2017

Thank you for your help with this. It returns the name and email address. Is it possible to get just the name?