Using a radio button to automtically copy billing details from shipping, or vice versa, is common practice to reduce the number of steps a user must take to make a purchse.

In order to accomplish this, a form must have both shipping address and billing address containers.

*Copying shipping informatino into billing is not supported with Square.

Copying Shipping to Billing

Here is an example of HTML, with LeanTags that copies shipping details into the billing container.

<div data-lp-type="copy_shipping_to_billing" data-lp-section-to-hide="billing_fields_container">
<input id="copy" type="radio" checked value="copy"></input>
<label for="copy">Billing Same as Shipping</label>
<input id="not_copy" type="radio" checked value="not_copy"></input>
<label for="not_copy">Different Billing Address</label>
</div>
<div id="billing_fields_container" style="display:none">
<input data-lp-type="billing_full_name" ></input>
</div>

Copying Billing to Shipping

Here is an example of HTML, with LeanTags, that copies billing details into the shipping container.

<div data-lp-type="copy_billing_to_shipping" data-lp-section-to-hide="shipping_fields_container">
<input id="copy" type="radio" checked value="copy"></input>
<label for="copy">Shipping Same as Billing</label>
<input id="not_copy" type="radio" checked value="not_copy"></input>
<label for="not_copy">Different Billing Address</label>
</div>
<div id="shipping_fields_container" style="display:none">
<input data-lp-type="full_name" ></input>
</div>