Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How do I populate a date field with todays date when the signature field is signed?

jeffm70816839
Level 2
Level 2

How do I populate a date field with todays date when the signature field is signed? In LCD I insert a signature field and a date field, what settings in these two fields are required to make this work? Is the date field set to calculated? I tried different JS suggestions I found but none work. In the form I named the signature field ClaimSignature and the date field ClaimSigDate.

1 Accepted Solution
jeffm70816839
Correct answer by
Level 2
Level 2

Figured it out with a little help. In the script editor window I chose the postSign event and added the following JS:

  form1.page1.ClaimSignature::postSign - (JavaScript, client)

var date = new Date();

var day = date.getDate();

var month = date.getMonth() + 1;

var monthstring = (month , 10 ? "0" + month : month)

var year = date.getFullYear();

var datestring = year + "-" + monthString + "-" + (day < 10 ? "0" + day : day);

ClsimSigDate.rawValue = dateString;

Hope this helps someone else save time.

View solution in original post

1 Reply
jeffm70816839
Correct answer by
Level 2
Level 2

Figured it out with a little help. In the script editor window I chose the postSign event and added the following JS:

  form1.page1.ClaimSignature::postSign - (JavaScript, client)

var date = new Date();

var day = date.getDate();

var month = date.getMonth() + 1;

var monthstring = (month , 10 ? "0" + month : month)

var year = date.getFullYear();

var datestring = year + "-" + monthString + "-" + (day < 10 ? "0" + day : day);

ClsimSigDate.rawValue = dateString;

Hope this helps someone else save time.

View solution in original post