2 Replies Latest reply: Aug 2, 2011 12:48 PM by zei-mgilvey RSS

    Certificate of Completion with Date Stamp

    zei-mgilvey Community Member

      Greetings,

       

      Is it possible to make a form that will automatcally add a date stamp to it.? Here is the scenario: a user completes a series of questions through an eLearning module. At the end of it, they click on a button/link that takes them to a page that has a PDF in it. The PDF has a fillable form so they enter their name into it and at some point, maybe when they get to the pdp, it is time/date stamped for that user. They print the PDF out and give it to their supervisor.

       

      Make sense?

       

      Maybe it's not possible to get the stamp to be added as soon as they get to the PDF, maybe they have to push a button on the PDF to have it added? I don't know what is possible or if it is possible. We would just like to have some way to get a date stamp onto the PDF. The PDF doesn't have to be downloaded, it only needs to be printed as hardcopy, although having an option to have the PDF emailed to the user might be an option as long as it can only be printed.

       

      Comments, suggestions?

        • 1. Re: Certificate of Completion with Date Stamp
          George_Johnson CommunityMVP

          Yes, it's possible, with a bit of JavaScript. You can have the date field automatically populated when the form is first opened or after they enter their name. For the latter, you could add the following script to the Validate event of the name field:

           

           

          // Get a reference to the date field
          var f = getField("date");
          
          if (event.value) {
              f.value = util.printd("mm/dd/yyyy", new Date());
          } else {
              f.value = "";
          }
          

           

          Replace "date" with the actual name of your date field. You can also use a different date format, but this should get you started. If you want it to populate when the document is opened, it's a bit more complicated, but post again if this is what you want.

          • 2. Re: Certificate of Completion with Date Stamp
            zei-mgilvey Community Member

            This rocks! I just selected the Name field, double-clicked it, went to the Validate tab and pasted it into the Edit field for the "Run custom validation script" and blymy it works!

             

            Thanks George