Reputation: 13
I am creating a form wizard which has three forms in three different tabs and the user can only go to next tab once the form in the current tab is validated. It works fine as long as there are no controllers on each form. Since I need to do some logic, I am attaching controllers to each of these forms but once the controllers are put, the tabs are getting enabled even when the form is invalid. Here's the plunkr link
`http://jsfiddle.net/bs4agngu/
Regards, Charan
Upvotes: 1
Views: 1606
Reputation: 1163
check this : how to disable external button in angular when form is invalid
you can use something like this :
<input ng-disabled="formName.$invalid" type="button" class="btn btn-primary" ng-click="$broadcast('Save')" />
Upvotes: 1