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

Change text to uppercase in a PDF Form

Guest
Feb 21, 2012 Feb 21, 2012

Copy link to clipboard

Copied

Hi,

Im very inexperienced in Adobe and have recently begun creating some forms for users to fill in.

I need to know how I can make the field automatically change what ever has been written in a text box to uppercase, and also if its possible just to change the first letter to upper case.

any help is greatly appreciated.

Thanks

TOPICS
Create PDFs , Edit and convert PDFs

Views

78.6K

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
1 ACCEPTED SOLUTION
Community Expert ,
Feb 21, 2012 Feb 21, 2012

Copy link to clipboard

Copied

You can use the custom format script, like this:

To convert the inserted value to all upper-case:

event.value = event.value.toUpperCase();

To convert just the first letter to upper-case:

event.value = event.value.substring(0,1).toUpperCase() + event.value.substring(1);

View solution in original post

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
Community Expert ,
Feb 21, 2012 Feb 21, 2012

Copy link to clipboard

Copied

You can use the custom format script, like this:

To convert the inserted value to all upper-case:

event.value = event.value.toUpperCase();

To convert just the first letter to upper-case:

event.value = event.value.substring(0,1).toUpperCase() + event.value.substring(1);

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
Guest
Feb 21, 2012 Feb 21, 2012

Copy link to clipboard

Copied

Thanks for the super fast response try67, i will give it a go now and see how it works.

On a different note, is there any way to export(or update) the filled data to a .csv file

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
Community Expert ,
Feb 21, 2012 Feb 21, 2012

Copy link to clipboard

Copied

Yes, in Acrobat X go to Tools - Forms - More Form Options - Manage Form

Data - Import Data or Export Data

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
Guest
Feb 21, 2012 Feb 21, 2012

Copy link to clipboard

Copied

worked GREAT!! U saved me a lot of headache, thanks again.

Final question, is it possible to have the first letter of every field in the form be capital? or must I do the above forumla for individual fields?

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
Community Expert ,
Feb 21, 2012 Feb 21, 2012

Copy link to clipboard

Copied

You need to apply it to each field separately, but this can also be done

with a script.

The best way is to place the code in a doc-level function, and then call

that function from the fields' formatting code.

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
Guest
Feb 21, 2012 Feb 21, 2012

Copy link to clipboard

Copied

all working now

Still cant figure out the export form filled data. When I select XML it starts to OCR and takes a while as it does the whole document. I only want the filled data to be exported to .csv

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
New Here ,
Mar 18, 2021 Mar 18, 2021

Copy link to clipboard

Copied

I figured out how to do it for each field separately, but I don't know how to do it for multiple fields at a time. Can you explain more? Thanks.

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
New Here ,
Feb 12, 2019 Feb 12, 2019

Copy link to clipboard

Copied

Guys, someone could be so kind to share me a PDF example with the working script please?

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
Guest
Jul 29, 2019 Jul 29, 2019

Copy link to clipboard

Copied

This really helped but I ran into one issue.

It works great for 1 word that has been input as lowercase.  Is there an option for inputs of all caps? or if there is an hyphenated name?

The examples below arent producing the desired results.  Is this possible?

THOMAS should change to Thomas but it remains THOMAS

thomas jones should change to Thomas Jones but it changes to Thomas jones

thomas-jones should change to Thomas-Jones but it changes to Thomas-jones

Thanks!

JT

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
Community Expert ,
Jul 29, 2019 Jul 29, 2019

Copy link to clipboard

Copied

It's possible, but it will require a much more complex script. You would need to first split the name string using a regular expression with all of the characters that you want to use as the delimiters, then edit each "word" (ie, item in the array of the split method), and then re-combine the values in the array using the same delimiters as before...

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
Guest
Jul 29, 2019 Jul 29, 2019

Copy link to clipboard

Copied

Yeah, thats a little too intricute. 

What about the all caps to proper?  Is that one difficult too?  i.e.  THOMAS beinf forced to Thomas.  Is that easily workable?

JT

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
Community Expert ,
Jul 29, 2019 Jul 29, 2019

Copy link to clipboard

Copied

Sure. You can use this code for that:

var name = event.value;

var words = name.split(" ");

for (var i in words) words = words.charAt(0).toUpperCase() + words.substring(1).toLowerCase();

event.value = words.join(" ");

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
New Here ,
Sep 12, 2019 Sep 12, 2019

Copy link to clipboard

Copied

Help! I'm trying to export the field data to a csv and keep the case. I'm running the script below to change case but when I export as a csv it places the test back to the original input case.

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
New Here ,
Nov 02, 2019 Nov 02, 2019

Copy link to clipboard

Copied

And I want to Capatilize each word then what is the Formula

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
Community Expert ,
Nov 02, 2019 Nov 02, 2019

Copy link to clipboard

Copied

Look at reply of try67.

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
New Here ,
Nov 02, 2019 Nov 02, 2019

Copy link to clipboard

Copied

please provide javascript to change it to proper case

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
Community Expert ,
Nov 02, 2019 Nov 02, 2019

Copy link to clipboard

Copied

Look at the replies!

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
New Here ,
Nov 02, 2019 Nov 02, 2019

Copy link to clipboard

Copied

i am a new user cant find replies please copy paste in my reply

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
Community Expert ,
Nov 02, 2019 Nov 02, 2019

Copy link to clipboard

Copied

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
New Here ,
Nov 02, 2019 Nov 02, 2019

Copy link to clipboard

Copied

But Dear it does not capatilize first letter in each word it only capatilize 1st word of a sentence

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
New Here ,
Nov 02, 2019 Nov 02, 2019

Copy link to clipboard

Copied

And I want to Capatilize each word then what is the Formula

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
Community Beginner ,
Apr 05, 2023 Apr 05, 2023

Copy link to clipboard

Copied

Try67, 

Do you have a script to capitalize the first letter of every word in a string? 

For example: 

"1 first street" to "1 First Street"

 

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
Community Expert ,
Apr 05, 2023 Apr 05, 2023

Copy link to clipboard

Copied

Look at reply of try67.

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
Community Beginner ,
Apr 05, 2023 Apr 05, 2023

Copy link to clipboard

Copied

LATEST

So as I read it, it requires a much more complex script. 

and this script is just for "Proper sentencing" 

var name = event.value;

var words = name.split(" ");

for (var i in words) words = words.charAt(0).toUpperCase() + words.substring(1).toLowerCase();

event.value = words.join(" ");

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