Copy link to clipboard
Copied
I would like to post a form online for people to download/print. Each time someone opens up the form, I need a date field on the form to automatically populate today's date and for it to be read only. They must be able to print/download the form for themselves. Thier downloaded form should retain the date that populated when they first printed it. However, the original form as posted online should re-populate today's date for any user who opens it.
I have been experimenting with different Javascript solutions I found online, but many are for other versions of Acrobat and I can't get anything to work. Does anyone have a solutation specifically for Acrobat DC 21.0? The more specific, the better. Thanks so much for any advice!
Copy link to clipboard
Copied
Are they opening and fill file online?
Copy link to clipboard
Copied
Yes, that's correct.
Copy link to clipboard
Copied
Go to Tools - JavaScript - Document JavaScripts and add a new script. Remove all the code that's created by default and add this instead (let's say your field is called "Today"):
this.getField("Today").value = util.printd("dd/mm/yyyy", new Date());
This will only work in PDF viewers that support scripting, of course.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now