Rhyzz/repeatable-fields — pull request #3 by CodeAnimal (2014-09-05 11:44:26+00:00)
Title: Add data attribute based templating and other improvements

I have added the ability to have data attribute based templates to the template row, which then have their row-count-placeholder values updated when a row is moved.

I have also added a few other options. The `row_count_placeholder` option allows to customize the placeholder replace string. I have updated the README to describe how to use the new features.

Everything is backwards compatible, and there should be no breaking changes, as all options have sane defaults. The only option that _may_ be a breaking change is the `reset_inputs` option, which is true by default and resets/clears all input values when a row is added. This is normally what you'd want anyway, but this can be false by default if you prefer.

data attribute based templating works by setting data attributes on elements within the template row. An attribute can be: `data-template-name` where "template" is from the `data_prefix` option ("template" by default) and "name" is the attribute it is templating. This allows the row count to be updated for that templated attribute when the row is moved. If that attribute already exists, the template attribute will override it. So, if you want an attribute to update the row index when it is moved (like an order field) then use the template, otherwise use the usual attribute, which is only updated on adding it.

The `minimum` option is used to specify a minimum number of rows, which are created on initialization if the number of rows don't equal the minimum already. The remove elements are disabled for the first minimum number of rows also, helping to enforcing the minimum.

I haven't updated the version number, assuming you would want to do this to your liking.

I think that is everything, I am using my updated version in a project I am working on, so it's pretty well tested. If you have any questions or issues I can get back to you. Thanks for this great plugin.