Skip to content Skip to footer

Form script to set Date & Time on a load of the form

Description

This form script is used to set the Date & Time when user open the form. It will capture the form load Date & Time and set into the form field.

function on_load(ws){
var date = new Date();
datestring = date.getFullYear() + '-' + JSON.stringify(date.getMonth() + 1) + '-' + date.getDate() + ' ' +date.getUTCHours() + ':' + date.getUTCMinutes();
ws.setWidgetValue('Identifire1',datestring);
ws.reloadUICell('Identifire1');
}

Was This Article Helpful?

1
0 Comments

There are no comments yet

Leave a comment

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami