• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can I make the date field autofill with todays Date with Acrobat DC?

New Here ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

Can I make the date field autofill with todays Date with Acrobat DC?

TOPICS
PDF forms

Views

33.0K

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

correct answers 1 Correct answer

Community Expert , Feb 15, 2017 Feb 15, 2017

I moved your question to the PDF Forms forum.

OK, here's how you do it: Search the tools for Document JavaScripts and open it. Create a new item. Let's call it "load".

Delete any pre-existing code in the window that opens, and paste this code instead into it:

this.getField("Today").value = util.printd("mm/dd/yyyy", new Date());

The code above assumes you have a field called "Today" that you want to populate with today's date. You can change that, as well as the date format, if you wish.

Votes

Translate

Translate
Community Expert ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

Yes, it's possible to do that with the desktop version of Acrobat. Is that what you have? Because you posted in the DC PDF Services forum...

Votes

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 ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

I'm thinking I may have posted in the wrong forum. I have a trial version of Acrobat DC on my desktop.

Votes

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
Community Expert ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

I moved your question to the PDF Forms forum.

OK, here's how you do it: Search the tools for Document JavaScripts and open it. Create a new item. Let's call it "load".

Delete any pre-existing code in the window that opens, and paste this code instead into it:

this.getField("Today").value = util.printd("mm/dd/yyyy", new Date());

The code above assumes you have a field called "Today" that you want to populate with today's date. You can change that, as well as the date format, if you wish.

Votes

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
Community Beginner ,
Dec 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

Nothing auto-populates in my Today date field using that code. I still have to pick a date. What am I missing?

Votes

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
Community Expert ,
Dec 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

Where does you use the script?

Votes

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
Community Beginner ,
Dec 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

I nthe Validate tab in Properties.Pic.png

Votes

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
Community Expert ,
Dec 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

Use the script at document level.

Votes

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
Community Beginner ,
Dec 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

LATEST

Thank you. I was setting it to populate upon opening, but I wasn't closing and re-opening. My mistake. THANK YOU!!!

Votes

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
Community Beginner ,
Nov 16, 2022 Nov 16, 2022

Copy link to clipboard

Copied

Hi, I need assistance with an Adobe Acrobat template that opens with Acrobat DC. The form requires several signtures and a separtate date field  dor each signer to be signed through Adobe Acrobat Sign. I need the form to be able to autofill the date field  when each individual signs. Can you please assist.

Votes

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 ,
Feb 15, 2017 Feb 15, 2017

Copy link to clipboard

Copied

Thank you! I was trying to figure out how to add JavaScript under the "Prepare" section in tools. Your help is appreciated

Votes

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
Contributor ,
May 02, 2018 May 02, 2018

Copy link to clipboard

Copied

Hello,

I used the above script and it works great.  Will this keep a static date if the the saved form is opened later?  The date will be going on an employee application, so it needs to store the date the application was filled and saved, and should not change later.

Thanks for any help.

Votes

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