User should be able to type in upper case without caps lock

Brijmohan
Tera Contributor

Hi All,

Is there any way to make filed by default upper case in catalog item. If user will type, all letters should be in upper case.

I am aware about the toUpperCase function but it will convert value when you go on next field but I want this on same time when user type. Please suggest. 

Thanks in advance! 

1 ACCEPTED SOLUTION

OlaN
Giga Sage
Giga Sage

Hi,

There is no way to achieve this that I know of.

Either you allow to write in lower case, and make use of toUpperCase method when saving etc.
Or there is a possibility to write a onChange client script that uses regex that only allows for uppercase characters, then it can display an error (and clear the text) when writing characters in lower case.

View solution in original post

3 REPLIES 3

Community Alums
Not applicable

Hi @Brijmohan ,

ServiceNow has onChange() that will have to be used & is only option.

If you are looking at getting text converted as soon as user enters & moves on to next character in the text field it is not possible.

There is solution mentioned here using OnLoad() as well :

https://community.servicenow.com/community?id=community_question&sys_id=e6cf72addb58dbc01dcaf3231f96...

Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep

Community Alums
Not applicable

Hi @Brijmohan ,

Any update to this ?Any follow-up required? if not

Kindly mark the answer as Correct & Helpful both such that others can get help.

Thanks,
Sandeep

OlaN
Giga Sage
Giga Sage

Hi,

There is no way to achieve this that I know of.

Either you allow to write in lower case, and make use of toUpperCase method when saving etc.
Or there is a possibility to write a onChange client script that uses regex that only allows for uppercase characters, then it can display an error (and clear the text) when writing characters in lower case.