Expand my Community achievements bar.

SOLVED

LiveCycle ES2 - Auto Populate Date field when signed

Avatar

Level 1

Good afternoon,

I've got a signature field called "sgnPOC" and a date field called "sgnPOCDate" I'd like to have the date field filled in automatically when the sgnPOC is digitally signed.

I added the following to the postSign* event to sgnPOC.

 FORM.Main.sgnPOCDate.rawValue = util.printd("mm/dd/yyyy", new Date()); 

and different variations including setting the date to yyyymmdd and like. It just won't auto populate. It passes the script check in the script editor.

any ideas?

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Level 10

FORM.Main.sgnPOC::postSign - (JavaScript, client)


FORM.Main.sgnPOC::postSign - (FormCalc, client)

View solution in original post

4 Replies

Avatar

Level 10

Hi,

I suggest you to use Formcalc for this which it is more convenient to use this language for dates when using Livecycle..

var myDate = date()

$.rawValue = Num2Date(myDate, "YYYY-MM-DD")

Avatar

Level 1

Thank you,

I tried the following - to no success.

I also tried this

Which also did not work, but wouldn't that need to know where to put the date?

Avatar

Correct answer by
Level 10

FORM.Main.sgnPOC::postSign - (JavaScript, client)


FORM.Main.sgnPOC::postSign - (FormCalc, client)

Avatar

Level 1

ahh thank you, I completely missed that!