Yapapaya / jquery-cloneya

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

Increment the numeric array index for cloned field names #4

Closed gchokeen closed 10 years ago

gchokeen commented 10 years ago

When field name come with array format, sometime it required to increment the array index. So i added the code to do that in the redos method. Please merge it if you feel it's useful.

Example : 
Default field : <input type="text" name="emails[0]"/>
Cloned Field : <input type="text" name="emails[1]"/>
DamiansDesign commented 9 years ago

The merged code is wrapped in:

if ($this.config.serializeIndex) { ... }

There is no 'serializeIndex' config option. Shouldn't it be 'serializeID'?

gchokeen commented 9 years ago

@DamiansDesign : It's not related to this pull request, because those changes are applied recently, still it's good find