I have a form for an address and a form for another address, both forms have the same fields.
When one form is filled, I want the user to be able to check a box to copy the form data over to the other form as these will be the same values most of the time.
I have all the text fields working, I’m just stuck with the dropdown menu for country and province.
Here is what I’ve got so far:
function FillShipping(f){ if(f.shippingtoo.checked == true)
{
{
f.email1.value = f.email.value;
f.fullName1.value = f.fullName.value;
f.address1.value = f.address.value;
f.address3.value = f.address2.value;
f.city1.value = f.city.value;
f.postCode1.value = f.postCode.value;
f.phone11.value = f.phone1.value;
f.phone22.value = f.phone2.value;
f.phone33.value = f.phone3.value;
f.cell11.value = f.cell1.value;
f.cell22.value = f.cell2.value;
f.cell33.value = f.cell3.value;
}
}
else
{
f.email1.value = '';
f.fullname1.value = '';
f.address1.value = '';
f.address3.value = '';
f.city1.value = '';
f.postCode1.value = '';
f.phone11.value = '';
f.phone22.value = '';
f.phone33.value = '';
f.cell11.value = '';
f.cell22.value = '';
f.cell33.value = '';
}
}
Try this (assuming your country and province combo names are
country,province,country1andprovince1):