Auto Capitalize Text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2022 08:55 AM
We have a requirement to auto capitalize text entered by IT staff when submitting a catalog item. We use integration hub and are using it to create AD groups from submission of a catalog item but to keep our standard of Active Directory we need the text to be in capital letters from when they fill in the catalog form on the portal. What is the best way to achieve?
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2022 09:15 AM
You can have a onChange client script, to auto-convert the input to upper case, or you can have a validation which shows a message to the show field message that the field can only contain capital letters.
Out of these two, I would prefer the second one, since the user will enter the input in desired format instead of getting confused by auto conversion.
You can utilize below logic for same.
if (str != str.toUpperCase()){// str is your field input
g_form.showFieldMsg('your_field','Lower case not allowed, only caps','error');
}
If you still want auto conversion:
You can use onchnage client script with below code:
g_form.setValue("your_field_name",str.toUpperCase());
Feel free to mark correct, If I answered your query.
Will be helpful for future visitors looking for similar questions 🙂
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2022 10:00 AM
Thanks Aman - When you say field name would i enter the part for the variable name? as it is a variable on the item?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2022 10:03 AM
Yes, name of the variable.
var str = g_form.getValue("your_field_name");
now you can just copy the code.
Aman Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2022 12:37 AM
Hey
Didn't hear back on this.
Is your issue resolved? If yes, feel free to mark helpful/correct, so it will be helpful for others looking for similar query.
Aman Kumar