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

Date field not updating in Adobe Acrobat Online

Explorer ,
Mar 01, 2024 Mar 01, 2024

Hi there,

 

I've recently created a fillable PDF form. This form has two date fields: (1) "Today" field, which autofills today's date, and (2) "Start Date" field, which autofills 2 weeks from today's date.

 

This form has been published on our Intranet site. After downloading the form to test it, the document opened in Adobe Acrobat Online, and I noticed that the "Today" field updated to the correct date but the "Start Date" field didn't update correctly. I then tried opening the file in my desktop version of Adobe Acrobat and both dates updated correctly. 

 

I'm wondering why the "Start Date" field isn't updating properly in Adobe Acrobat Online, but works fine in the desktop version? Is it possible to fix this date field so that it also updates correctly in the online version?

 

I've included a screenshot below of how it appears on the online version - the Start Date field should have autofilled to "03/15/2024". Happy to upload a copy of the file too if need be. Thanks!

 

Screenshot 2024-03-01 102101.png

 

 

TOPICS
General troubleshooting , How to , JavaScript , PDF , PDF forms
749
Translate
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 ,
Mar 01, 2024 Mar 01, 2024

Because the online version doesn't support scripts.

Translate
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
Explorer ,
Mar 01, 2024 Mar 01, 2024

@try67 If that's the case, why does the script work for the "Today" (Agreement Date) field?

Translate
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 ,
Mar 01, 2024 Mar 01, 2024

Maybe it supports some script commands, and not others... What code did you use for both fields?

Translate
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
Explorer ,
Mar 01, 2024 Mar 01, 2024
LATEST

@try67 I used the following document level scripts:

 

"Today" (Agreement Date) field:

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

 

"Start Date" field:

if (this.getField("Today").valueAsString == "")
 this.getField("Start Date").value = "";
else{
 var today = util.scand("mm/dd/yyyy", this.getField("Today").valueAsString);
 var startDate = new Date(today);
 startDate.setDate(today.getDate() + 14);
 this.getField("Start Date").value = util.printd("mm/dd/yyyy", startDate);}

 

Could it have something to do with Document Actions? I programmed the 'Document Will Save' action for the "Today" field and the 'Document Did Save' action for the "Start Date" field.

Translate
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