Team Forms automatically tracks the date/time between starting a new form response and submitting it for auditability. This information is viewable on the submission screen. However, it can sometimes be desirable to display this time within the form itself. This article will show you how to build and display this information in the form itself.
Displaying the start date/time
Drag and drop a date/time component into your form. This will be used to capture the start date of the form response.
Within the component settings navigate to the data tab and set the "Default Date" property to
moment()
. This will automatically set the value of this date component to the date/time that the user started the submission.Navigate to the display tab of the component settings and click the "disable" setting. This will prevent users from modifying the date value we set in step 2.
Displaying the submitted date/time
Drag and drop a date/time component into your form. This will be used to capture the date/time of the submission.
Within the data tab navigate to the calculated value section and set the calculated value to the following JavaScript. This will set the value to the current time a constantly update the date as the user interacts with the form.
value = moment()
Navigate to the display tab of the component settings and click the "disable" setting. This will prevent users from modifying the date value we set in step 2.