form Blogs
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
Kiprosh is now part of LawLytics
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
All of us have e-forms in our apps, it is an effective tool for gathering information of and from the users. A user fills the e-form and saves the same. Many-a-times, we need to monitor if the user has modified the form contents after once saving the form. Found a plugin that monitors form changes. Add the following code to .js file: (function ($) { $.fn.watchChanges = function () { return this.each(function () { $.data(this, 'formHash', $(this).serialize()); }); }; $.fn.hasChanged = function () { var hasChanged = true; this.each(function () { var formHash = $.data(this, 'formHash'); if (formHash == $(this).serialize()) { hasChanged = false; return true; } }); return hasChanged; }; }).call(