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

Auto Date Field, acrobat 9 standard

JLPane
Registered: Dec 5 2009
Posts: 9

How do I add an auto date field in a form with acrobat 9 standard?

My Product Information:
Acrobat Standard 9.2, Windows
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You need to make a read only text field and use document level JavaScript to set the value of the field.

this.getField("MyDateFieldName").value = util.printd('mmm d, yyyy', new Date() );
Have a look at Thom Parkers tutorials:
[url=http://www.acrobatusers.com/tutorials/2006/date_time_part1]Working with Date & Time Part 1[/url]
[url=http://www.acrobatusers.com/tutorials/2006/date_time_part2/]Working with Date & Time Part 2[/url]
[url=http://www.acrobatusers.com/tutorials/2007/07/js_document_scripts]Entering Document Level JavaScripts[/url]

George Kaiser

try67
Expert
Registered: Oct 30 2008
Posts: 2398
Why a document-level script? You can just embed this script into the document itself and it will launch whenever the file is opened.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
Document level scripts are embedded in the document and only execute upon the document being opened and not every time a calculation event is triggered. The script is entered using the 'Advanced => Document Processing => Document JavaScripts'.Are thinking of folder level scripts that are entered into the JavaScript folder for the Acrobat/Reader application and need to be called?

George Kaiser

JLPane
Registered: Dec 5 2009
Posts: 9
I cant find Document JavaScripts, Im using Acrobat 9 standard, also I cannot bring up debugger manually. I tried ctrl +J and looked all over the menu etc.
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
You can also use the page open action or the custom calculation script with some modification.

George Kaiser

JLPane
Registered: Dec 5 2009
Posts: 9
I used the code you suggested in the custom calculation area that worked thanks for your help.
Still dont understand why I dont have any javascript choices on my menu bar is that only in acobat pro?
JLPane
Registered: Dec 5 2009
Posts: 9
With Acrobat Standard can I make a form field with a drop down list, one with fixed names, and one with an address list from a data base or can I make the field store the address or names that were previously entered?