The signature component is great for requesting an approval/verification within your form. While Team Forms automatically logs the time stamp of any submissions in the background (against the version history) you may want to populate a date/time field in your form whenever a user signs a signature component. This can be done using the following method:
Drag and drop a signature component and a date/time component into your form.
Under the signature component’s settings, go to the ‘Logic’ tab and find the ‘On Change’ setting. This allows you to enter custom JavaScript code that runs whenever the signature field is updated.
Use this feature to update the value of the date/time component set up in step 1. Enter the following code, making sure to replace ‘dateTime’ with the actual name (in the api tab) of your date/time field:
instance.root.getComponent('dateTime').setValue(moment().toISOString())