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

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

New Here ,
Nov 06, 2024 Nov 06, 2024

Copy link to clipboard

Copied

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());

TOPICS
How to , JavaScript , PDF forms

Views

178

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

correct answers 1 Correct answer

Community Expert , Nov 06, 2024 Nov 06, 2024

Enter the following custom validation script in the text1 field:

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

Votes

Translate

Translate
Community Expert ,
Nov 06, 2024 Nov 06, 2024

Copy link to clipboard

Copied

Enter the following custom validation script in the text1 field:

if(event.value)
{this.getField("TimeStamp1").value=util.printd("HH:MM", 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 ,
Nov 09, 2024 Nov 09, 2024

Copy link to clipboard

Copied

LATEST

Thank you for your assistance.

 

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