This browser does not support basic Web standards, preventing the display of our site's intended design. May we suggest that you upgrade your browser?

Adobe Acrobat 8 Professional

PDF Forms: Inserting an Automatic Date Field

You may want to know the date that a user completes a form. You can insert a text field in your PDF form that will automatically insert the current date. This field uses a simple JavaScript at the page level. Adding an automatic date field is a two-step process: First you must add the Date field. Then, you must add the JavaScript to the Page Properties.

return to topInserting the Date Field

  1. Open the PDF form you would like to add a date to

  2. From the View menu, select Toolbars » Forms
    The Forms toolbar appears.
    Forms toolbar

  3. Click TEXT FIELD TOOLText Field tool

  4. Position the cursor where you want the form field to begin 

  5. Click and drag the mouse until the form field is of desired size

  6. Release the mouse button
    The Text Field Properties dialog box appears.
    Text Field Properties dialog box: General

  7. On the General tab
    1. In the Name text box, type Today
    2. In the Common Properties section, select Read Only
      NOTES:
      It is selected when a check appears in the box next to it.
      This is necessary for calculated fields such as a date.

  8. On the Format tab
    1. From the Select format category pull-down list, select Date
    2. From the Date Options scroll box, select a date format option
      NOTE: This representation of the date format will be used when adding the JavaScript. An example of the date format is shown below the list.

  9. Click CLOSE

return to topAdding the JavaScript

  1. From the Navigation pane, click PAGESPages icon
    NOTES:
    The Pages pane opens.
    This action toggles between hiding and displaying the Pages pane.

  2. Right click the page thumbnail of your form that contains the Date field » select Page Properties...
    The Page Properties dialog box appears.

  3. Select the Actions tab
    Page Properties dialog box - Actions tab

  4. In the Add an Action section, from the Select Trigger pull-down list, select Page Open

  5. From the Select Action pull-down list, select Run a JavaScript

  6. Click ADD...
    The JavaScript Editor dialog box appears.
    JavaScript Editor dialog box

  7. Type the text shown here:
    var f = this.getField("Today");
    f.value = util.printd("mmm/d/yyyy", new Date());

    NOTES:
    Improper spacing in the text may affect results.
    The date format must match the format you selected in step 8a of Inserting the Date Field.

  8. Click OK

  9. Click OK

Excellence. Our Measure. Our Motto. Our Goal.