5
Answers

How to remove textbox border color click on reset button

Photo of Ajay Shedge

Ajay Shedge

9y
428
1
Angularjs how to remove textbox border color after click on reset button.
I have used below code but textbox color could not be remove in angularjs
 $scope.cancel = function () {
clear();
$scope.frmCustomerRegistration.$setPristine();
}

Answers (5)

0
Photo of Dorababu Meka
NA 8.2k 1.2m 9y
Try from this link http://stackoverflow.com/questions/30529131/angularjs-ng-required-not-clear-the-notification-after-closing-model
0
Photo of Ajay Shedge
NA 37 7.8k 9y
Hello Dorababu, I have use different class on clear button click for textbox (remove textbox red color) but when I clicked on submit button without enter data in textbox, textbox border color not changed (not changed as red) Also I have used $scope.frmCustomer.$setPristine();
0
Photo of Dorababu Meka
NA 8.2k 1.2m 9y
It will be similar too, in your reset button make it valid or apply a different class
0
Photo of Ajay Shedge
NA 37 7.8k 9y
Hello Dorababu, Thanks for reply.I refer link no. 1 and I got a answer but tell me if i use reset button and I click on submit button at that time textbox border color get red (my textboxes are blank) and I clicked on reset button I want to remove textbox red border color and reset a form.
0
Photo of Dorababu Meka
NA 8.2k 1.2m 9y
Check the article here
 
 http://www.coding-issues.com/2015/09/show-red-border-for-invalid-inputs-fields-on-form-submit-angularjs.html
 
Another sample
 
http://jsbin.com/cowufugusu/1/edit?html,css,js,output