sisyphus icon indicating copy to clipboard operation
sisyphus copied to clipboard

Multiple checkbox not restore data

Open cdevassine opened this issue 6 years ago • 0 comments

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 !

cdevassine avatar Jun 06 '18 16:06 cdevassine