Posts

Showing posts from July, 2025

Show Character Counter for Form Fields in ServiceNow Without Risky DOM Manipulation

Image
 📝 Summary: When entering names or descriptions in fields like Client Scripts , Business Rules , or Scheduled Jobs , users often hit the maximum character limit unexpectedly. This results in rewriting and poor user experience. This article provides a simple and safe solution that shows remaining characters for specific fields , improving form usability—without using unsafe DOM manipulation techniques. 💡 Use Case: You're creating or editing records in tables like: sys_script (Business Rules) sys_client_script (Client Scripts) sys_trigger (Scheduled Jobs) You try typing in the Name or Short description fields, and suddenly you hit a max character limit without any warning. This script shows the remaining characters live , just below the field, to avoid surprises. ✅ Key Features: Works on standard forms (not just Service Portal) No risky HTML DOM manipulation Displays live character counter Optionally shows warning message when limit is exceeded Easy ...