Copy link to clipboard
Copied
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");
You have several problems in your code. Use this:
if (event.target.value!="Off") {
this.getField("StreetAddress").value = this.getField("StreetAddress2").value;
this.getField("City").value = this.getField("City2").value;
this.getField("Province").value = this.getField("Province2").value;
this.getField("PostalCode").value = this.getField("PostalCode2").value;
}
Copy link to clipboard
Copied
You have several problems in your code. Use this:
if (event.target.value!="Off") {
this.getField("StreetAddress").value = this.getField("StreetAddress2").value;
this.getField("City").value = this.getField("City2").value;
this.getField("Province").value = this.getField("Province2").value;
this.getField("PostalCode").value = this.getField("PostalCode2").value;
}
Copy link to clipboard
Copied
Perfect, and I see my errors. I want a target, not to GET...
Thank you very much...Again!!!