Change text to uppercase in a PDF Form

New Here ,
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

47.2K

Likes

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

Most Valuable Participant , Feb 21, 2012 Feb 21, 2012
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);

Likes

Translate

Translate
Most Valuable Participant ,
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);

Likes

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 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

Likes

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
Most Valuable Participant ,
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

Likes

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 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?

Likes

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
Most Valuable Participant ,
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.

Likes

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 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

Likes

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

LATEST

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.

Likes

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?

Likes

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 ,
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

Likes

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
Most Valuable Participant ,
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...

Likes

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 ,
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

Likes

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
Most Valuable Participant ,
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(" ");

Likes

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.

Likes

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

Likes

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

Copy link to clipboard

Copied

Look at reply of try67.

Likes

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

Likes

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

Copy link to clipboard

Copied

Look at the replies!

Likes

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

Likes

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

Copy link to clipboard

Copied

Likes

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

Likes

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

Likes

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

Please help! The forum is acting buggy so please excuse if this is a duplicate. I'm trying to export data from a pdf form to a .csv, and keep the case (all caps). I'm using the following JS: 

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

When the data is exported it displays in the .csv file in the case that was orginaly entered into the form. Is there a way to export the data and keep the case format?

Likes

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