Remove helptext from a field without DOM manipulation:
var worknotes = g_form.getLabel('work_notes_list');
worknotes.removeChild(worknotes.lastElementChild);
another option
function removeHintFromLabel(fieldName) {
var oField = g_form.getLabel(fieldName);
var fieldChildren = oField.childNodes;
for (var c = 0; c < fieldChildren.length; c++) {
var className = fieldChildren[c].className;
if (className.indexOf('icon-help') != -1) {
oField.removeChild(fieldChildren[c]);
}
}
}
removeHintFromLabel('work_notes_list');
with DOM - note: old article, not necessarily the best to use DOM
https://servicenowguru.com/scripting/client-scripts-scripting/showhide-service-catalog-variable-help-text/
Comments
Post a Comment