How to add date in a date field after signature then clear it after clearing signature
The following code works to add a date in "Date1" field but when I try to clear the same signature, the date still remains.
What am I missing?
if (getField("Signature1").value !== '')// signature is present
this.getField("Date1").value= "";
else
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
var signingTime = day +"/"+month+"/"+year //Modify into your preferred format
var f = this.getField("Date1"); //Modify the field name as necessary
f.value = signingTime;
