Change dynamic date/time in Adobe form to static

75 pts.
Tags:
Adobe
Adobe Acrobat
JavaScript
I have an Adobe form that automatically populates the date and time of a request and then is emailed (fdf) for fulfillment. When the recipient opens the form, the time changes to the current time. The code that I am using is: this.getField("RequestDate").value = util.printd("m/d/yyyy HH:MM", new Date()); and it is in the custom calculation script on the Calculate tab. The ideal situation would be that all data sent becomes write protected once it is submitted, but I need the date/time to become static once they hit the submit button. Would I have better luck using the Actions tab? If so, how? Any suggestions for improving this situation will be greatly appreciated.

Answer Wiki

Thanks. We'll let you know when a new response is added.

You could change the scripting event from the form/doc open to the form submit/submit button click event. Then the ability to change the value is limited to whether the user can interact with the button.

Alternatively, you can set a persistent global value containing a boolean that indicates that the form was once submitted. (You probably have this: <a href=”http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf”>http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf</a>) Under global > global methods > setPersistent.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • DanBubis
    I didn't have the Javascripting reference so thanks for that. I like the idea of of submitting being what triggers the date and time. The added benefit is that if it sits on a user's desk for a while before submission, the time will be a more accurate reflection. I will see if I can make that work. Thanks.
    75 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following