Skip to main content
Known Participant
June 9, 2022
Question

Automatic date field in a PDF

  • June 9, 2022
  • 2 replies
  • 2956 views

I have utilized a java script to insert an automatic date/timestamp field in a PDF.  I was successful in doing that but it saved the form with the date/time. I want this to be blank each time it's opened and insert the date/time when someone has to fill out the form.

This topic has been closed for replies.

2 replies

JR Boulay
Community Expert
Community Expert
June 10, 2022

Copy-paste this URL in Google Translate to see a nice tuto and get a nice sample file that will answer your question:

https://www.abracadabrapdf.net/ressources-et-tutos/js-et-formulaires-ressources/champ-date-automatique/

Acrobate du PDF, InDesigner et Photoshopographe
Known Participant
June 10, 2022

ok thanks, I will take a look.

Known Participant
June 10, 2022

When I place it under Tools - JavaScript - Document JavaScripts it adds the pull down as pictured below. I do not want it to do that. It needs to auto fill the date / time when a person opens it.

 

 

 

try67
Community Expert
Community Expert
June 9, 2022

Where did you place the code? What triggers it?

Known Participant
June 10, 2022

It's within Page Properties, Actions (Select a Java Script)

try67
Community Expert
Community Expert
June 10, 2022

You need to move it to be a doc-level script, so that it only runs when the file is opened.

Place it under Tools - JavaScript - Document JavaScripts to achieve that. Do NOT place the code in a function, though.