How to remove the white spaces of the value and show it at the same time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2022 10:37 PM
We have created one UI page as mentioned in below screenshot, as per our configuration if user enters a value in field "T
As per my requirement is users put the value in first field with some extra spaces such as " Test" and then clicks on submit but he will get error but it keep shows the value as " Test" , However it should show like "Test" i mean it should remove the extra space at the same time.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2022 10:49 PM
Hi,
I doubt you can do that at same time. you can write onChange event on that text input and trim the whitespaces which are leading or trailing
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2022 10:52 PM
OnChange Event means you are talking about onChange client script.?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2022 09:29 PM
Nope; since it's an UI page you will have to use onChange event
onChange client script won't work right since it's not a form
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader