8 Replies Latest reply on May 21, 2016 6:35 PM by JeffBPaarsa

    Populating multiple fields from another field.

    JeffBPaarsa Level 1



      In a multi page form, on the first page I have a field called ToDaysDate that will be populated upon opening of the form, other pages have Readonly fields that are called CToDaysDate which on the same JavaScript that is Opening the form, will copy the value of ToDaysDate to CToDaysDate.  It almost works %95 of the times...  Here is the code that is executed upon entry and opening of the Form:

      function populate_date()


      if (this.getField("ToDaysDate").value == this.getField("ToDaysDate").defaultValue) {

      this.getField("ToDaysDate").value = util.printd("m/d/yyyy", new Date());



      populate_date(); // call my function

      getField("CToDaysDate").value = getField("ToDaysDate").value;


      What is so strange is that on page four of this forms, there are two fields of CToDaysDate,  because on this page user either sign on Participating or Non-Participating part based on where user sign, there is a date field of CToDaysDate... Strange thing that happens only the second CToDaysDate is populated the first one is left Blank!!! Why I have no idea... CToDaysDate#2 is left blank but CToDaysDate#3 is populated!  Both CToDaysDate#2 and CToDaysDate#3 are on page four, all the rest of CToDaysDate are populated on the other pages.


      I notice if I modify the date populated on the ToDaysDate fields the others keep their old value, I assume that I should run/create JavaScript that runs under the tab of Validation for ToDaysDate and after validating copy the value into CToDaysDate,,, Right?



      Jeff P.