Page 1 of 1

Copy Address Fields

Posted: Mon May 08, 2023 10:11 am
by christrentrsa
Hi

Can someone help with with the following:

I have a new customer registration page and I would like to add a button where when the user clicks on the button, it will copy the billing address to shipping address.

I have tried to add onclick events to a button but I don't know where to add the custom scripts. Can someone suggest how I can accomplish this?

Re: Copy Address Fields

Posted: Mon May 08, 2023 1:14 pm
by Pablo
There is no standard solution for this, because there is no way to do this 'visually'. So, this will require a custom script.

For example:
https://www.w3schools.com/howto/howto_j ... pboard.asp

Re: Copy Address Fields

Posted: Mon May 08, 2023 2:21 pm
by BaconFries
See the following with demo but in this you either select one or another radio button to copy the fields
https://www.plus2net.com/javascript_tut ... y-data.php

Re: Copy Address Fields

Posted: Sat Jun 24, 2023 5:19 pm
by christrentrsa
Thanks @BaconFries

This helped me a lot :D