Hi, I am trying to get a value formatted and to print with the pdf. I have this in the custom format section of the field:
if (event.value)
{
event.value = "XXX-XX-"+event.value.substr(5,4);
}
But on the pdf when I print all I get is 123456789 vs XXX-XX-6789. But it will show XXX-XX-6789 on the pdf until I click on it to edit it then it shows 123456789.
Not a clue as to what is going on.
Any help is good help.
Barkerz10
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/formatting_text_fields/
The format event does not change the value of the text field. It simply sets the appearance of the data. When you click on a text field, Acrobat puts the field into a kind of "edit" mode and exposes the underlying value of the field. Then you click off of a field, Acrobat commits the entered data into the real field value, which causes the data to be formatted before it is displayed.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script