Skip to main content
Participant
November 6, 2024
Answered

Show the current time of when a text is entered in a form

  • November 6, 2024
  • 1 reply
  • 517 views

I wanted to request some assistance on how i could be able to have a chart I created show the current time when a text is entered. I have two columns one for the text entry and one for the time to show when the text was entered in but I'm using this below and it only show the current time when opening the document and not the time a text has been entered. Would appreciate some assistance. Thank you. 

this.getField("text1").value = (“text”); var f = this.getField("TimeStamp1");

if (f.valueAsString=="") f.value = util.printd("HH:MM", new Date());

This topic has been closed for replies.
Correct answer PDF Automation Station

Enter the following custom validation script in the text1 field:

if(event.value)
{this.getField("TimeStamp1").value=util.printd("HH:MM", new Date());}

1 reply

PDF Automation Station
Community Expert
Community Expert
November 7, 2024

Enter the following custom validation script in the text1 field:

if(event.value)
{this.getField("TimeStamp1").value=util.printd("HH:MM", new Date());}

_5485Author
Participant
November 9, 2024

Thank you for your assistance.