Copy link to clipboard
Copied
Hello!
Is there a way to set a text field to automatically convert text to titlecase?
The scenario includes copying all caps text from another document. When that all caps text pastes into the text field, is there functionality available to automatically convert it to titlecase?
Thank you so much for your help!
Enter the following as a custom calculation script in the field:
function toTitleCase(str) {
return str.toLowerCase().split(' ').map(function (word) {
return (word.charAt(0).toUpperCase() + word.slice(1));
}).join(' ');
}
event.value=toTitleCase(event.value)
Copy link to clipboard
Copied
Enter the following as a custom calculation script in the field:
function toTitleCase(str) {
return str.toLowerCase().split(' ').map(function (word) {
return (word.charAt(0).toUpperCase() + word.slice(1));
}).join(' ');
}
event.value=toTitleCase(event.value)
Copy link to clipboard
Copied
Thank you so much! This worked beautifully. Many thanks to you.