Skip to main content
piksaperfect
Participant
Sep 19, 2016 1:09 PM UTC
Question

how do i convert a text string to proper case

I am new to Adobe Acrobat Pro DC. I want to do several things.

Firstly, convert a text string to proper (title) case.

Secondly I want to have a field duplicate the value entered into another field.

Thirdly I want to calculate the age of a person based on their date of birth and a given date (not based on today's date).

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Inspiring
Sep 19, 2016 3:27 PM UTC

These questions have  been answered many times in these forms, please try the search feature.

You will need to write or adjust any script that creates Title case to exclude words that are not capitalized in the title.

Once one gets the dob and the cut-off date or current date as Date objects the computation of age is done exactly the same way.

Translate
Participant
Nov 9, 2021 8:59 PM UTC

hard to find using the search feature.   i too, am trying to convert text field to proper case and cannot easily find the solution

Translate
try67
Community Expert
Community Expert
Nov 11, 2021 10:11 AM UTC

You can use this function to do it:

 

function toTitleCase(s) {
	var words = s.split(" ");
	for (var i in words)
		words[i] = words[i].charAt(0).toUpperCase() + words[i].substr(1).toLowerCase();
	return words.join(" ");
}
Translate