Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Script to capture who digitally signed the form

Avatar

Level 9

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

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

View solution in original post

8 Replies

Avatar

Correct answer by
Level 10

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

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

Avatar

Level 9

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

Avatar

Level 10

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

Level 9

This is what I get...

Firstname LastName <> (FirstName LastName)

Avatar

Level 10

Sorry, that doesn't tell me anything.

What was original string?

Avatar

Level 9

Sorry, I had to leave last night.

The original string was:

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

Avatar

Level 10

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

Level 9

radzmar,

That script works perfect!

Thanks so much!

-Don