Skip to main content
Participant
October 16, 2023
Question

Automate a current date, then lock.

  • October 16, 2023
  • 1 reply
  • 779 views

I need to find a way to automatically fill the current date on a file that will be downloanded from a site but once downloaded lock the date so when it's opened any time following the initial download it does not change.  Is there a solution for this type of request?

 

I know I can use a script to automate the current date every time it is opened but I need the date to change each time it's downloaded but not change after that. 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
October 16, 2023

You can't do it when the file is downloaded from within the file itself. You can only do it when it's opened.

You can add a condition to your code to only populate the field if it's empty, though.

If you want to do it when the file is downloaded you'll need to do so on the server-side, before sending a unique copy of the file to the user.

Participant
October 16, 2023

Thank you for your response.  Do you know if there is a way to lock the date to the current date it's opened?

try67
Community Expert
Community Expert
October 16, 2023

As I wrote, you can add a condition to that prevent the field from updating if it already has a value.

Beyond that you can set the field as read-only and set the default value to the date string, so it doesn't get deleted when the form is cleared. If someone really wants to change it, and they have Acrobat, they will be able to do it, though. It's not a 100% secure solution. Far from it...