How to create date field that automatically displays today's date in Acrobat DC

New Here ,
Mar 26, 2021 Mar 26, 2021

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! 

TOPICS
How to, PDF forms

Views

140

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

Are they opening and fill file online?

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 26, 2021 Mar 26, 2021

Copy link to clipboard

Copied

Yes, that's correct. 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Mar 26, 2021 Mar 26, 2021

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.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines