Is there a way to get the text field character counter to work in the SN portal (Orlando)?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2020 07:22 AM
I have enabled the property for the text field character counter (glide.ui.textarea.character_counter), but notice it only works on the internal (agent/sn_internal) form view, not on the catalog form view.
Is there a way to have the count show on the catalog form?
Thanks
Labels:
- Labels:
-
Service Portal
- 1,997 Views
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 11:02 AM
This onChange Catalog Client Script mostly works (in this example for a 100 character limit), but you only get the update to the field label if you leave the field:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var field = g_form.getLabelOf('variable_name');
var label1;
if (newValue.length < 100) {
label1 = field + " (char: " + newValue.length + " of 100 min)";
} else if (newValue.length >= 100) {
label1 = field + " (char: " + newValue.length + " limit met)";
} else {
return;
}
g_form.setLabelOf('variable_name', label1);
}