Custom field format on form

I have a form I'm working with in Adobe Acrobat and need a custom script to put numbers entered into the format, ######/#####, and I also need one for a field that must be 10 numbers in length, where if the user enters "123", the result is "0000000123".  I have never used javascript before, so if I'm able to do this without custom scripts somehow, that would be great.

Thanks!
LVL 2
johnson00Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Karl Heinz KremerCommented:
For the leading zeros, open up the properties for your text field and select the "Format" tab. Select a "Custom" format and then click on the "Edit" button for the "Custom Format Script". Use this script:

event.value = util.printf("%0 11d", event.value);

This will fill up the number with leading zeros until you have a 10 character long string.

I'm not sure what you mean by ######/#####. Will you always have 11 digits? If so, you can use this as the custom format script:

event.value = util.printx("999999/99999", event.value);
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Acrobat

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.