Need a date field to be locked upon first signature

islandgirl23

07-07-2020

Hello,  Please help me find a solution to this.  I have a form that has a "current" date field.  I would like for that date field to be locked when the first signature block is signed.  I tried to use the action builder, but I could not figure it out.  If you can provide a script, that would be appreciated.

Thank you.

View Entire Topic

Kosta_Prokopiu1

31-07-2020

Hi @islandgirl23,

I guess you used scripting for filling the date text field like so

kprokopi_1-1596199961243.png

When I call it without a signature the time is changed every time.

kprokopi_2-1596200005491.png

kprokopi_4-1596200108896.png

When I signed it the time stays

kprokopi_5-1596200217181.png

Place the date calculation inside an if such as this (status changes to 1 when the field has been signed).

 

if (event.target.getField("form1[0].#subform[0].SignatureField1[0]").signatureInfo().status == 0) {
  var datum = new Date();
  this.rawValue = datum.toISOString()
}