Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Today's Date Default Field in Acrobat X

Posted on 2011-03-03
2
Medium Priority
?
3,282 Views
Last Modified: 2012-05-11
Hi there.
Several years ago, I created a PDF document that had a date field that defaulted to today's date when it was opened. It used some JavaScript to make that happen. I've since upgraded to Adobe Acrobat X and need to do this for another form, but can't remember how I did it. I've tried several online resources and have come up empty. It seems everything I've found is for a different version of Acrobat and doesn't apply. Here's what I've tried so far:

http://www.ehow.com/how_2316630_insert-date-field-adobe-acrobat.html
The problem I'm running into is that the Trigger event listed in this article isn't consistent with what's available in this version of Acrobat. I was looking for a "Page Open" event to tie the JavaScript code to, but I only have these options:

Mouse Up, Mouse Down, Mouse Enter, Mouse Exit, On Focus, On Blur

Right now, the Java script code is applied in the Actions tab of the Text Field Properties, but I can't get this to work. Any suggestions? Am I missing something? Here's the code used to generate today's date:

var f = this.getField("wells_datefield");
if (!f.value) f.value = util.printd ("m/d/yyyy", new Date());

Thanks for your help.

J
0
Comment
Question by:brownmetals
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 44

Accepted Solution

by:
Karl Heinz Kremer earned 2000 total points
ID: 35036877
You can use a calulated value for that field. Bring up the field properties and select the "Calculate" tab, then select to use a custom calculation script and use the following line:

event.value = util.printd("m/d/yyyy", new Date());

That should do the trick.
0
 
LVL 4

Author Closing Comment

by:brownmetals
ID: 35060084
Awesome. Thanks for your help.
J
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article focuses on how to remove password security from multiple PDF files by Adobe Acrobat program. Sometimes it is essential to access the stored data items and to print, edit as well as copy content from Portable Document Format files in abs…
The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
In this first video of the three-part Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its…
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question