UI Action in SOW that asks from the user to draw a signature
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2023 11:18 AM
Hi,
I know that if i use this script:
function onClick(g_form) {
g_modal.showFields({
title: "Enter your reason",
fields: [{
type: 'textarea',
name: 'work_notes',
label: getMessage('Reason'),
mandatory: true
}],
size: 'lg'
}).then(function(fieldValues) {
g_form.setValue('work_notes', fieldValues.updatedFields[0].value);
g_form.save();
});
}
I will get this:
but what if i want instead of free text that the user will have the option to draw a signature? what should be the type instead of 'textarea'?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-25-2023 01:39 PM
I dont think servicenow has a signature feature by default, but someone correct me if i am wrong. I'v never seen it at least.
What you could do is create a UI script in which you import a signature library like signature pad. This library supports entering a signature and saving it into an image file, which you could then store in a image or html field to make it usable in your notes. Kind of a work around, but that is the easiest way to do it i think. Does require some scripting knowledge as it has to be tailored to how you want to implement and use it.