Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Time stamp on save form?

Avatar

Level 2

Is there a way that I could add a time stamp to my document and have it update whenever someone has saved a form? Users will be saving the pdf and emailing us the form not submitting the form using the submit button. This is going to take some javascript which I have almost zero experience with... Thanks for any help!

John

0 Replies

Avatar

Level 2

On any "preSave" event...

put

/*DATE_0*/var dtStamp = util.printd("yyyy/mm/dd HH:mm:ss", new Date());

app.alert(" >> ABC " + dtStamp);

have fun..

Luigi D'Amico

Avatar

Level 2

Off to a great start. When I use this script a pop up box appears displaying the current date. How would I instead get this date to show in a locked field on the form itself?

Not app.alert I'm guessing.

Also is this preSave event going to be triggered when this form is downloaded from an email client and saved to someplace on a users computer?

Avatar

Level 2

Got it to work with:

"this .rawValue="Last Saved: "+dtStamp;"

"this" being the text box I wanted the date displayed in.

And to answer my other question about downloading from a web client. the presave event is not triggered so I think this will work great to see what time the form was last saved. Thanks for the help.

Avatar

Level 2

So just a little formatting question. The current format is "m/dd h:MM" and I would like to add the abbreviated day of the week to the beggining and AM/PM to the end.

I tried: "EEE, m/dd h:MM A" But the EEE and A just appear as EEE and A. Any ideas? Thanks

Avatar

Level 1

AM/PM would be "h:MM tt" at the end of your format. As for abbreviated day of the week I am unsure.