Closed amatenkov closed 10 years ago
This check was added as outlined in this closed issue:
https://github.com/codedance/jquery.AreYouSure/issues/12
I believe we ignore unnamed fields as there is issues with .val(). These fields also don't post on a form so don't really mutate the dirty state. Are you able to add a name attribute to your field?
Yes, of course. I already did this.
Can I close this issue, or do you think it needs further investigation or documentation?
Yes, close.
Example. I have a form with hidden field. I use this field for checking complex structure for changes (serialize and write when this structure changes). After writing to field I trigger checkform.areYouSure. As you can see this field without name attribute.
So, AYS does not get value of this field, because function getValue checks for name attribute:
and return null if it undefined. When I delete this checking it works as expected. In 1.8 and 1.9 branch this checking exists too.
UPD: something works wrong without this checking. UPD2: Facepalm.jpg. It kendoNumericBox input without name and id. It I can fix in my form by setting 'fieldSelector' option, I hope.