Hello,
The functionality I am trying to replicate is similar to when you have the option to select "same as billing address" when ordering something online to use as the shipping address
I have found this article but I am not familiar with javascript, however there is some confusion about the name of the fields used in the screen shots and the names in the script. Below are my screenshots of the fields and controls involved and the script I am using. I am trying to test with the ShipToAddress and Ctiy to be copied to BillToAddress and City when check box is ticked.
Thanks
NWF$('#' + Same).click(function(){
var checkBox = NWF$('#' + varSame);
if (checkBox.is(':checked') == true){
var ShipToAddress = NWF$('#' + varShipToAddress).val();
var ShipToCity = NWF$('#' + varShipToCity).val();
NWF$('#' + varBillToAddress).val(ShipToAddress);
NWF$('#' + varBillToCity).val(ShipToCity);
}
else
{
var nullValue = '';
NWF$('#' + varBillToAddress).val(nullValue);
NWF$('#' + varBillToCity).val(nullValue);
}
});