Reputation: 507
my check boxes run a function with operates several tasks to manipulate the model programmatically and this seems to not allow the form to become dirty.
on the basis my form is named "testForm" how would I include a reference in my existing function to set the form to be dirty when that checkbox calls it on click?
do I need to reference the forms name or is it a case of setting the model to be dirty such as
$scope.$dirty = true;
Upvotes: 11
Views: 10623
Reputation: 12093
$form.$setDirty();
$form.email.$dirty = true;
Here, $form = form.
email = field name.
Upvotes: 11