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

jeffm70816839 19-05-2015

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.

Accepted Solutions (1)

Accepted Solutions (1)

jeffm70816839 26-05-2015

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.

Answers (0)