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');
}
0 Comments