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

Want to have entries Default to capital letters in fillable form

New Here ,
Nov 29, 2021 Nov 29, 2021

How do I have all entries in a fillable form default to capital letters?

TOPICS
Create PDFs , Edit and convert PDFs , How to , JavaScript , PDF forms
2.4K
Translate
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 ,
Nov 29, 2021 Nov 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();

View solution in original post

Translate
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 29, 2021 Nov 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();

Translate
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 29, 2021 Nov 29, 2021

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

Translate
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 29, 2021 Nov 29, 2021
LATEST

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