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

Auto fill dates and days in pdf form

New Here ,
Dec 24, 2024 Dec 24, 2024

Copy link to clipboard

Copied

Hi,

I found in the community page on how to insert auto date in the pdf form.

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

 

But I want to auto populate both date and day (eg 25 Dec 2024, Wednesday) etc..

I am not sure on the JS or how to write the code.

 

Appreciate any help.

TOPICS
PDF forms

Views

104

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 25, 2024 Dec 25, 2024

Copy link to clipboard

Copied

Use this format: "dd mmm yyyy dddd"

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 ,
Dec 25, 2024 Dec 25, 2024

Copy link to clipboard

Copied

Thank you, pardon my ignorant, where do I put the script ? Can provide the full script. Thanks

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 25, 2024 Dec 25, 2024

Copy link to clipboard

Copied

What do you want the trigger to be?  A button click?  When the PDF opens?  Something else?

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 ,
Dec 25, 2024 Dec 25, 2024

Copy link to clipboard

Copied

Thanks for the response, I want to auto populate day each time the pdf opens.

Suceeded to apply JS for my date field [this.getField("Today").value = util.printd("dd-mm-yyyy", new Date());] at Document level.

Not sure about Days though? Refer to sample

Peter37077418lfgf_0-1735131312614.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 25, 2024 Dec 25, 2024

Copy link to clipboard

Copied

If you want the format in the example you provided, use @Nesa Nurani 's format example.  To update when the document opens, enter as a document level script.  You will find all possible date formats in this article.

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 ,
Dec 25, 2024 Dec 25, 2024

Copy link to clipboard

Copied

LATEST

Thank you, guys it woking well!

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