Copy link to clipboard
Copied
Hi!
Is it possible to run a script that will force all letters in specific fields to appear as upper or lower case as soon as one hits tab or clicks the mouse on another field? This field would also need to remain capitalized through saving & printing.
Thanks!
Dawn
You can use a custom validate script for a text field:
// Custom validate script
// Convert entry to upper-case
event.value = event.value.toUpperCase();
You can also use a custom keystroke script to convert characters as they are typed by the user, something like:
// Custom keystroke script
event.change = event.change.toUpperCase();
To convert to lower-case, use the toLowerCase method.
Copy link to clipboard
Copied
You can use a custom validate script for a text field:
// Custom validate script
// Convert entry to upper-case
event.value = event.value.toUpperCase();
You can also use a custom keystroke script to convert characters as they are typed by the user, something like:
// Custom keystroke script
event.change = event.change.toUpperCase();
To convert to lower-case, use the toLowerCase method.
Copy link to clipboard
Copied
Thank you! It works great!
Please excuse the dumb question, but where would I insert the custom keystroke script? Also in the validation area?
Dawn
Copy link to clipboard
Copied
It is a bit hidden away. First select the Format tab and then select a Format Category of Custom, and you'll see where to enter the script.
Copy link to clipboard
Copied
In Microsoft Word there is an option to covert to "proper" case, where only the first letter of the word is upper case. Is there an equivalent in javascript?