Skip to main content
piksaperfect
Participant
September 19, 2016
Question

how do i convert a text string to proper case

  • September 19, 2016
  • 1 reply
  • 996 views

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 has been closed for replies.

1 reply

Inspiring
September 19, 2016

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.

Participant
November 9, 2021

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

try67
Community Expert
Community Expert
November 11, 2021

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(" ");
}