How to recognise whether form is modified or not in extjs4
I am working in extjs4. I am having form with multiple textboxes,radio
buttons and some more elements.Suppose i clicked on modify form. If user
made some editing in form,then i want to display message box window in
order to ask confirmation of saving of changes that user has made.If user
closes form without any modifications,then that messagebox should not be
appear.I was trying to use dirtychange event of form as-
me.getForm().on('dirtychange', function(form, isDirty) {
console.log(form.events);
if( isDirty ) {
isChanged=true;
}
else {
isChanged=false;
}
});
But its setting isChanged variable to always true though form is not
modified. So how to identify whether form is modified or not so that i can
display confirmation message box.
No comments:
Post a Comment