Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Numbers as Text

Status
Not open for further replies.

spaulding

Technical User
Jan 10, 2001
123
US
Need a little help here, and this should be easy, but I can't figure it out. I've got a form I built in Acrobat 6 to be displayed on our Intranet where all users have Reader 7. The form has a text field where they will input a budget code. This code uses numbers, but some of the codes begin with zero. I need those leading zeros to be displayed and currently, it seems Acrobat reads them and converts them to a number format (e.g. 001 is displayed as 1). I've tried formatting the text field with "none" as the format option and used a special format of OOO, but neither seems to make a difference. Am I missing an option somewhere, or is there another way to do this?
I appreciate the help.
 
Well, I finally found the answer at PlanetPDF.Com. You have to format the field as custom and apply a Javascript to it.

If my field name is "budgetcode", the Javascript would be

var budgetcode=this.getField("budgetcode").valueAsString;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top