These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Forcing upper case in an alpha/numeric textfield.

NancyM
Registered: Sep 25 2006
Posts: 40

I have a text field that allows both alpha and numeric entry. The numeric input can be anywhere in the field. What I am trying to accomplish is to make any alpha entry display in upper case on exit. Example entry a5df on exit would display A5DF.

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Place this code in the change (or Keystroke) event for the text field

LiveCycle Form:

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

AcroForm:

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

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

kbedward
Registered: Nov 9 2007
Posts: 29
Using LiveCycle 8, how would one change the text to be Initial Case. I have a field for names and would like the formatting to automatically capitalize the first letter
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The official way to add formatting to a field is to use a "Picture Clause". There is a whole document on how to create and use this handy formatting device. Do a search for "Picture Clause" on the Adobe Developer site

http://www.adobe.com/devnet

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script