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

Why would a field not display the value it has been given

CarolinaPower
Registered: Mar 26 2009
Posts: 43

I have written document javascript that assigns a date value to a form field. However, when the form loads, the date is listed as today (4/16/2009) in this case. But when I click on the date, the correct value is shown (5/14/2009). When I leave the field, it resets back to 4/16/2009

My Product Information:
Acrobat Standard 9.1, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
It sounds like you have conflicting scripts. Does the field have a format script?

The value of a form field and what the field displays are two different things. The display is set by the format event script. And the action you are describing is exactly what you would get when a format script is overiding the field value, i.e, when you put the keyboard focus on the field it displays the underlying value of the field, but when you click off it displays the value set by the format script.

Here's an article on format scripts:
http://www.acrobatusers.com/tutorials/2006/formatting_text_fields

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/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

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