• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Automatically change case to titlecase

Explorer ,
Oct 22, 2024 Oct 22, 2024

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!

TOPICS
Create PDFs , Edit and convert PDFs , How to , PDF , PDF forms

Views

77

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 22, 2024 Oct 22, 2024

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)

Votes

Translate

Translate
Community Expert ,
Oct 22, 2024 Oct 22, 2024

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)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 22, 2024 Oct 22, 2024

Copy link to clipboard

Copied

LATEST

Thank you so much! This worked beautifully. Many thanks to you. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines