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

Forms

aneez
Registered: Jan 18 2007
Posts: 4

I have a textbox field with format set to none. From the form am assigning some numeric value like"0123". After assigning the value if do getField for this textbox from the JavScript console, the value I get is "123"? Why? What should I do to get the value as "0123", without changing the format for the textbox?

My Product Information:
Acrobat 6, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Acrobat is returning "123" because it's assumeing that this is a number. Use the "valueAsString" property instead.

this.getField("Text1").valueAsString;

Thom Parker
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://partners.adobe.com/public/developer/en/acrobat/sdk/
pdf/javascript/AcroJS.pdf]Acrobat JavaScript Reference[/url]

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