Yapapaya / jquery-cloneya

A jquery plugin to clone DOM elements
MIT License
76 stars 28 forks source link

function to clone input values and increment name/value #3

Closed leandroruel closed 10 years ago

leandroruel commented 10 years ago

is possible this plugin clone a container wrapper, and your childs elements with the value and name, and if possible increment name/value?

actual-saurabh commented 10 years ago

Yes, it is. Ideally, due to the nature of cloned form elements, the names should be name[], so that the values can be processed as arrays. If you need to increment name and/or value, you can plug into the custom event - clone_form_input. See: https://github.com/yapapaya/jquery-cloneya/blob/master/jquery-cloneya.js#L119