Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple checkbox not restore data #153

Open
cdevassine opened this issue Jun 6, 2018 · 0 comments
Open

Multiple checkbox not restore data #153

cdevassine opened this issue Jun 6, 2018 · 0 comments

Comments

@cdevassine
Copy link

Hello, First of all, thanks for this code, it is really excellent!

I noticed a bug since v1.1.3 about multiple checkboxes (bug is not present in v1.1.2).
Since v1.1.3, the getElementIdentifier() function retrieves the ID and name of a field.
In fact, it fails to restore data from multiple checkboxes.

I fixed on my local code with this :
function getElementIdentifier(el) {
//fix get Multiple Checkbox []
var name = el.attr( "name" );
if ( name.indexOf( "[" ) !== -1 )return '[name=' + name + ']';
return '[id=' + el.attr( "id" ) + '][name=' + name + ']';
}

but it's not necessarily the best.
Any idea ? ;)
thank you very much !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant