I made a js fiddle based on what you ask.
HTML
Home Address: <input id="address" name="address" type="text" /> <br/>Apt or Suite Number: <input id="suite" name="suite" type="text" /> <br/>City/Town: <input id="city" name="city" type="text" /> <br/>State: <select id="state" name="state" value=""> <option value="AL">Alabama</option> <option value="AK">Alaska</option> </select> <br/>Zip: <input id="zip" name="zip" type="text" value="" /> <br/> <p>Select Shipping Address Below:</p> <input type="checkbox" id="shipping-address-1" name="address1" value=""> <label for="shipping-address-1" id="shiadd1">(Print auto-populated shipping address here...)</label> <input type="checkbox" id="shipping-address-2" name="address2" value=""> <label for="shipping-address-2">ABC Corp 123 Main Street, My City, State Zip</label>
Javascript
$("#address,#suite,#city,#state,#zip").change(function () { var addressArray = [$("#address").val(), $("#suite").val(), $("#city").val(), $("#state").val(), $("#zip").val()]; $("#shiadd1").text(addressArray.join(' ')); });
source share