...

View Full Version : Today's Date in Acrobat form



dmk
12-17-2003, 04:38 PM
I have a date field in an Acrobat (v 5.0.1) form and I want it to be preloaded with the current date when the user opens the form. I have to work within Acrobat's code box and I used the following (provided in their documentation) but it didn't work:
The script name is Today


var f = this.getField("Today");
f.value = util.printd("mm/dd/yyyy", new Date());

The message I get is
TypeError: f has no properties . Can you help? Thanks.

adios
12-17-2003, 05:45 PM
If "f has no properties" then presumably it's not a Field object. How did you create it?

By "The script name is Today" ....did you mean the field's name?

dmk
12-17-2003, 09:30 PM
In the Acrobat Help, in their JavaScript section, they provide code to fill a form field with the current date. I cut and pasted it directly.

And Today is the name of the script. Acrobat asks you to fill in a name and it calls that the name of the "script."

adios
12-18-2003, 02:20 AM
Would need to see the entire (generated) page.

dmk
12-18-2003, 03:27 AM
That's not possible. Thanks anyway.

glenngv
12-18-2003, 03:55 AM
http://www.adobe.com/support/techdocs/cd36.htm

dmk
12-18-2003, 04:46 AM
Thank you so much! It worked perfectly. I'm not sure why I came here instead of visiting Adobe's site -- maybe it's the personal touch we give and get! Thanks.

Diane



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum