Gmail-like client-side drafts and bit more. Plugin developed to save html forms data to LocalStorage to restore them after browser crashes, tabs closings and other disasters.
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 !
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 !