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

Add date and time to a text field when form is submitted

New Here ,
Aug 30, 2016 Aug 30, 2016

Is there a way to add the current date and time to a text field when the user is clicking the submit form button?

I created a custom submit form button and am not using the distribute process to collect results and would like to have a time stamp of when the form was submitted.

Thanks!

TOPICS
Acrobat SDK and JavaScript , Windows
612
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

correct answers 1 Correct answer

Community Expert , Aug 30, 2016 Aug 30, 2016

Sure. Before your submit command add an Execute JavaScript command with this code:

this.getField("SubmitDate").value = util.printd("mm/dd/yyyy HH:MM", new Date());

Adjust the field name and/or date pattern as required.

Translate
Community Expert ,
Aug 30, 2016 Aug 30, 2016

Sure. Before your submit command add an Execute JavaScript command with this code:

this.getField("SubmitDate").value = util.printd("mm/dd/yyyy HH:MM", new Date());

Adjust the field name and/or date pattern as required.

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 ,
Aug 30, 2016 Aug 30, 2016
LATEST

Perfect Thank you!!!

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