Skip navigation
yenguru
Currently Being Moderated

Inserting automatic time field in forms

May 15, 2012 10:34 AM

I know how to add a date field, but I would also like to add a time field.

 

I have used the following javascript in the page properties of the page containing the date field

 

var f = this.getField("Today");
f.value = util.printd("mmm/d/yyyy  HH:MM tt", new Date());

 

And I am able to get the date but the time field does not change from the time when the form was first created. 

 

Any help ???

 
Replies
  • Currently Being Moderated
    May 15, 2012 10:58 AM   in reply to yenguru

    What happens when you save and close the PDF and then in 5 minutes open the form?

     
    |
    Mark as:
  • Currently Being Moderated
    May 15, 2012 11:41 AM   in reply to yenguru

    Are you getting any errors in Acorbat's JavaScript console?

     

    Is JavaScript truned on?

     
    |
    Mark as:
  • Currently Being Moderated
    May 15, 2012 11:59 AM   in reply to yenguru

    Not that I can see.

     

    Is the form being reset or cleared?

     

    Do you need to know the time the page was opened or the PDF opened?

     

    A sample 2 page form: https://acrobat.com/#d=*ImmY-NPbuUd08yadLcq6g

     
    |
    Mark as:
  • Currently Being Moderated
    May 15, 2012 12:10 PM   in reply to yenguru

    The creaeted date or time is very different than the date or time a page was opened or a PDF was opened.

     

    You can us the docs info property to get the CreationDate or the ModDate

     

    this.info.CreationDate

     

    this.info.ModDate

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points