2 Replies Latest reply on Sep 22, 2017 6:38 AM by murrjames

    populate fields from other fields if checkbox checked.

    murrjames Level 1

      On page 1 I have an address box... City, Province, Postal code, street address

       

      On page 2, if user checks box, the fields from Page 1 populate the address box on page 2

       

      I put this JS in the MouseUp of the checkbox

       

      When I check the box, in the fields on Page 1, the field text is replaced with [object Field]

      I found this on this forum,

       

      Checkbox is named sameaddress. The fields with the 2 are the fields on Page to, to get the text from Page1

      if (getField("sameaddress").value!="Off")

      this.getField("StreetAddress").value = this.getField("StreetAddress2");

      this.getField("City").value = this.getField("City2");

      this.getField("Province").value = this.getField("Province2");

      this.getField("PostalCode").value = this.getField("PostalCode2");