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

Keep ZERO digit

gadgetman
Registered: Nov 2 2007
Posts: 14

in a text box formatted as a number, how can i keep the ZERO digit if I'm entering "06". As of now, when I tab out of the box, it erases the zero leaving me with just "6" in the box.

Thanks!

My Product Information:
Acrobat Pro 8.1.2, Macintosh
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You will have to provide custom JavaScript for the keystroke and format.

See: How to ensure numeric field custom format

http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=13362

George Kaiser

gadgetman
Registered: Nov 2 2007
Posts: 14
gkaiseril... thank you for the response. I'm afraid I'm too new to this and don't know exactly what I need to do. I followed the link to the other post, but I think I may need some more explaination as I'm not quite sure I understand ... I guess I'm looking for the exact code/javascript to enter and where to enter it.

What I am trying to do is this... I have fields that are set up as so:

. _____ %

The user is to enter a 2 digit # in the blank. Most will begin with a zero. If user inputs a zero, I need it to be there (as of now, if I enter "06" it shows as just "6"). If the user does not begin with a zero, I don't want a zero present (for instance I don't want it formating to 012 if the user inputs "12"). Hope that makes sense.
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
It is far easier to use the predefined format for the percentage format than to write a custom format becuase not only would you need to write the keystroke and format script but you will also have to write the code to get the number out of the custom formatted character string inorder to any mathmatical operation.

You might find you time well spent looking at the eSeminar on demad "Getting Started with Forms" on the home page for this site.

https://admin.adobe.acrobat.com/_a200985228/p17266135/

George Kaiser

gadgetman
Registered: Nov 2 2007
Posts: 14
The problem is that the % sign is already pre-printed on the form. If I use the predefined percentage format, it will end up with the two percent signs (%%), will it not?