5 Replies Latest reply on Jul 22, 2013 3:37 PM by try67

    Time and Date when saving a fillable form


      I have created an order form for my company and I am having problems with creating a java script that will put the Date and Time at the top of the form only when it is saved. How would I go about this I have tried a few different scripts with no avail.


      var ft = this.getField("Time_Saved");

      ft.value = util.printd("HH MM ss", new Time());


      var oNow = new Date();

      var sSubDate = util.printd("mmm dd, yyyy", oNow );

      this.getField("Invoice_Date").value = sSubDate;



      // var f = this.getField("DatePrinted"); // field object

      // f.display = display.noView; // only print the field

      // f.value = "Printed on: " + util.printd("mmm dd, yyyy", new Date()); // // set the value of the field


      // get the current date/time object

      var oNow = new Date();

      // create date time sring for sumbission

      var sSubDate = util.printd("dd/mmm/yyyy h:mm tt", oNow);

      // fillin field for date and time of sumission

      this.getField("SubmitDate").value = sSubDate;


      If someone is able to help me though this that would be great more or less what am i doing wrong?