Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
just a simple jquery plugin that copys a group of inputs to another in side a form...
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
jquery.copyfields.js

README

I just needed to be able to copy value of fields from one place to another, and this did the trick...

Think billing address and shipping address...

Example:
<script>
  $("#same").copyFields("#shipping", "#billing")
</script>
<form>
  Billing Address:
  <div id="billing">
    <input name="billing_street_address" type="text">
    <input name="billing_city" type="text">
    <input name="billing_zip" type="text">
    <input name="billing_state" type="text">
  </div>
  Shipping Address:
  Same as above?
  <input type="checkbox" id="same">
  <div id="shipping">
    <input name="shipping_street_address" type="text">
    <input name="shipping_city" type="text">
    <input name="shipping_zip" type="text">
    <input name="shipping_state" type="text">
  </div>
</form>
Something went wrong with that request. Please try again.