Hi Guys,
Anyone got any ideas how I can adapt the following Javascript onload event to create and electronic signature.
On my add page when a user clicks the "Staff Sign" checkbox, I would like a the "Staff Signature" field to be automatically updated with the current logged in users"username"along with a timestamp, therefore forming an electronic signature.
The code below allows me to insert some text when the checkbox is ticked but I'm struggling to pull the username and timestamp.
I'm, trying to use something like $_SESSION["username"] and now() with no luck.
Any ideas would be greatly appreciated.
Thanks
J
Anyone got any ideas how I can adapt the following Javascript onload event to create and electronic signature.
On my add page when a user clicks the "Staff Sign" checkbox, I would like a the "Staff Signature" field to be automatically updated with the current logged in users"username"along with a timestamp, therefore forming an electronic signature.
The code below allows me to insert some text when the checkbox is ticked but I'm struggling to pull the username and timestamp.
I'm, trying to use something like $_SESSION["username"] and now() with no luck.
Any ideas would be greatly appreciated.
Thanks
J
var ctrlIvc50 = Runner.getControl(pageid, 'staff_Sign'); var ctrlIvc50T = Runner.getControl(pageid, 'staff_Signature'); ctrlIvc50.on('change', function(e) { if (this.getValue()=='on'){ ctrlIvc50T.setValue("Expires Soon"); ctrlIvc50T.addValidation("IsRequired"); } else { pageObj.hideField("staff_Signature"); ctrlIvc50T.removeValidation("IsRequired"); ctrlIvc50T.setValue(''); } });