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

Dynamic date field and password protection

New Here ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

I have a pdf that has a dynamic date field. The date field works great until I password protect the document and than it no longer works. Is there a way to still have the dynamic date field work AND have a password protected document? I need to password protect it so no one can make any changes to the document. I also need to it always have "todays date" displayed.

TOPICS
Security digital signatures and esignatures

Views

720

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 ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

You have to allow the filling-in of form fields in your policy for it to

work.

On Thu, Apr 6, 2017 at 3:47 PM, kimh20816669 <forums_noreply@adobe.com>

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 ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

I have additional form fields in the pdf that need to be locked and un-editable by others.

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 ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

Then set them as read-only, but that setting must be enabled for the script to be able to change the value of your field.

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 ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

Got it! 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
New Here ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

Another quick question if anyone has an answer. When using a dynamic date field, is there a way to do it so that if a person opens your document and saves it, it saves with the date they saved the document and no longer updates. If that makes sense.

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 ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

Put the code under the Will Save event of the document (Tools - JavaScript - Set Document Actions) and add to it an if-condition that it should only populate the field if it's empty.

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 ,
Apr 07, 2017 Apr 07, 2017

Copy link to clipboard

Copied

This is the code I put in, but it is still changing after I save the document elsewhere.

var f = this.getField("Today");

f.value = util.printd("mmm/d/yyyy", new Date());

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 ,
Apr 07, 2017 Apr 07, 2017

Copy link to clipboard

Copied

Use this code:

var f = this.getField("Today");

if (f.valueAsString=="") f.value = util.printd("mmm/d/yyyy", new Date());

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 ,
Apr 11, 2017 Apr 11, 2017

Copy link to clipboard

Copied

I added this code to my document and it isn't working as I had hoped.

When I have this code in, the dynamic date field stays the same and doesn't update from day to day.

What I am hoping to do is have a dynamic date field in a pdf the always shows todays date. However, if someone SAVES the pdf to their computer, I want it to save with the date they saved the document so if they open in 2 days later, it still shows the old date when they saved it.

Is this possible?

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 ,
Apr 11, 2017 Apr 11, 2017

Copy link to clipboard

Copied

No. Saving the file to one's computer does not trigger any events in it. If you want to do that then you need to do it server-side, before sending them the file.

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 ,
Apr 13, 2017 Apr 13, 2017

Copy link to clipboard

Copied

LATEST

At the Will Save event store the date in a hidden field. In your field "Today" use the date of the hidden field or the current date.

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