Acrobat XI - Automatic Date In Form When Opened

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » Everything Else » Tech Support » Acrobat XI - automatic date in form when opened
Acrobat XI - automatic date in form when opened
 Lakshmi.Buukki
Offline
Server: Lakshmi
Game: FFXI
By Lakshmi.Buukki 2015-01-09 08:57:29
Link | Quote | Reply
 
Hello,

I am playing around with Adobe and I am trying to create a form that pre-populates the date in the associated form field, in mmmm-d-yyyy format. I got the script to work yesterday, but today I tried opening the document and the date still had yesterday's date. I want to modify the script so that it always changes the date when I open the document. For instance, if I created and saved the form on January 8th, but didn't re-open the form until january 10th, I would like "January 10, 2015" to be populated every time on that date, etc.

These are the steps I took to do this:

-Click on tools > forms > edit
-Click "Add New Field" and select "Text Field"
-Select where you would like to place the text and type in
Today"
-A yellow popup should appear that says "All Properties". Click on that and the Field Properties Tab should appear. If the yellow box disappears, you can access the Field Properties tab by double clicking on the Text Box.
- (I performed the editting to the text so the format would appear in mmmm-d-yyyy format, and also selected "Read Only")
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());

I am just stumped. Please keep in mind I am not very good at Adobe, and the majority of what I performed was found by searching it on google, and reading/watching videos on it. But I don't understand the appropriate steps to make my formula work as I indicated above.

Can any techy people really give me a hand here? I would appreciate it if the person could give me steps to how to perform the function, rather than using adobe language that I may or may not know how to access (Document Javascript - I have some familiarity). I know its possible to do this, and I appreciate any advice.
 Ragnarok.Sekundes
Offline
Server: Ragnarok
Game: FFXI
user: Sekundes
Posts: 4214
By Ragnarok.Sekundes 2015-01-09 14:10:36
Link | Quote | Reply
 
I have adobe standard X but not XI. I could try it on this but your instructions show your menus and options are quite different than mine. But I'll see what I can figure out.
 Lakshmi.Neboh
Offline
Server: Lakshmi
Game: FFXI
user: Neboh
Posts: 458
By Lakshmi.Neboh 2015-01-09 14:45:58
Link | Quote | Reply
 
Dunno if this helps.
[+]
 Lakshmi.Buukki
Offline
Server: Lakshmi
Game: FFXI
By Lakshmi.Buukki 2015-01-09 15:09:21
Link | Quote | Reply
 
Thanks Neboh. That worked, but I'll have to check it again tomorrow or Monday to see if the date changes. Because I could have swore I did these steps and the next day, the date stayed the same. Or maybe I was inserting the calculation from the Form Properties and not from the Document JavaScript. Idk if that makes a difference, they seem like the same formula.

If I save this document (its a template) and then reopen it on Monday, the date should change, correct?
 Lakshmi.Neboh
Offline
Server: Lakshmi
Game: FFXI
user: Neboh
Posts: 458
By Lakshmi.Neboh 2015-01-09 16:04:35
Link | Quote | Reply
 
Yes it should change if you copied the formula exactly the way it was shown.
 Lakshmi.Buukki
Offline
Server: Lakshmi
Game: FFXI
By Lakshmi.Buukki 2015-01-12 09:00:26
Link | Quote | Reply
 
Just checked. it worked. Thanks a lot Neboh.
Log in to post.