Skip to main content
New Participant
May 7, 2024
Question

Initials Field w/ Auto Populating Time Stamp Field

  • May 7, 2024
  • 2 replies
  • 746 views

I have a document with several line items that I am looking to create a initial field next to each line item.  Once initials are entered, there would be a seperate field next to it that auto populates a time stamp (date/time).  This document may not be completed all in one sitting so it seems the e-signature would not be the solution.  In addition, this document would be used multiple times so I am not sure if there is a way to clear all fields after each use?

This topic has been closed for replies.

2 replies

Amal.
Community Manager
Community Manager
May 7, 2024

Hi there

Hope you are doing well and thanks for reaching out.

The workflow you are trying to achieve is might be possible using JavaScript. For more information please check the help pages listed below:
https://acrobatusers.com/tutorials/javascript_console/
https://helpx.adobe.com/acrobat/using/applying-actions-scripts-pdfs.html

Hope it will help

Regards
Amal

try67
Community Expert
May 7, 2024

- You can use a script to populate a field with the current time when a value is entered in the initials field.

The basic code to do that is something like this (as the custom Validation script of the initials field):

 

if (event.value) this.getField("TimeStamp1").value = util.printd("mmddyyyy_HHMMss", new Date());

else this.getField("TimeStamp1").value = "";

 

- Sure. You can add a button that clears the entire form when clicked, using the built-in "Reset Form" action, or this code:

this.resetForm();

AFTRMINDAuthor
New Participant
May 8, 2024

Thank you! I am pretty new to code for Adobe.  I am creating a text field to enter initials.  I pasted your code under "Run customer validation script:".  Doing so, when I enter text nothing happens.  I was successful with creating a reset button so there's a start and thank you for your help!

Nesa Nurani
Community Expert
May 8, 2024

Did you change "TimeStamp1" to the actual name of the field where you want to show timestamp?