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

Removing Dashes From Entered Text

ckortlandt
Registered: Sep 10 2007
Posts: 2

How do I remove dashes from user entered data in a field. I would like to make this an exit event. Example user types 9788-1-567-0 into the field and upon exit the field auto removes the dashes and ends up with 978815670

My Product Information:
LiveCycle Designer, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Is this a LiveCycle or AcroForm PDF? How it's done depends on which forms technology you are using.

Either way, the actual removal of dashes can be done with the Core JavaScript "replace" function, which is a member of the String Object. Look it up in your Core JavaScript Reference.

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