Skip to main content
This topic has been closed for replies.
Correct answer try67

Go to the Properties dialog of the text field and under Format select Custom, and enter the following under Custom Keystroke Script:

 

event.change = event.change.toUpperCase();

2 replies

Participant
November 29, 2021

Would I have to do that with every box? Is there a way to format the whole document at once?

try67
Community Expert
Community Expert
November 29, 2021

You want to apply it to all text fields in the file? If so, you can do it using this code:

 

for (var i=0; i<this.numFields; i++) {
	var fname = this.getNthFieldName(i);
	var f = this.getField(fname);
	if (f==null) continue;
	if (f.type=="text")
		f.setAction("Keystroke", "event.change = event.change.toUpperCase();");
}
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
November 29, 2021

Go to the Properties dialog of the text field and under Format select Custom, and enter the following under Custom Keystroke Script:

 

event.change = event.change.toUpperCase();