Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Force Text Field to Upper and Lower Case

michael20041960
Level 1
Level 1

I have read a lot of post regarding forcing text in a text field to upper case and the first letter in the field to upper case and the rest to lower case. I have been able to get these to work:-

All uppercase........ if (event.change.length > 0) {event.change = event.change.toUpperCase() }

First Letter upper then the rest of text to lower........... event.value = event.value.substring(0,1).toUpperCase() + event.value.substring(1).toLowerCase();

I would like a simple script that would change all words entered, to be first letter of each word to Upper case and the rest of the word Lower case, eg michael david or MICHAEL DAVID to Michael David

Any help would be greatly apprecaited

0 Replies