angular-xeditable icon indicating copy to clipboard operation
angular-xeditable copied to clipboard

Ability to see if form has changed values

Open JetFault opened this issue 9 years ago • 2 comments

I have editable form and want to throw up a confirm dialog if you make changes but don't hit save (hit cancel). Is there a way to see if the form values changed?

JetFault avatar Jun 05 '15 00:06 JetFault

Let's say your editable form has:

<form editable-form name="myEditableForm" oncancel="checkCanceled()">

You can access values like an angular form in your controller. Check $scope.myEditableForm.$dirty:

$scope.checkCanceled = function() {
    console.log($scope.myEditableForm.$dirty);
};

jdforsythe avatar Jun 23 '15 14:06 jdforsythe

@JetFault are you still having an issue?

ckosloski avatar Aug 25 '17 21:08 ckosloski