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

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

New Here ,
Nov 06, 2024 Nov 06, 2024

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
535
Translate
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
1 ACCEPTED SOLUTION
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());}

View solution in original post

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

Translate
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
LATEST

Thank you for your assistance.

 

Translate
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