You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 15, 2021. It is now read-only.
I have a form divided in several tabs with fieldset. Before change to the next tab I want to validate the fieldset of the curret tab. For that I'm trying to use the ng-form directive and the function validateForm with a function like this one
I have a form divided in several tabs with fieldset. Before change to the next tab I want to validate the fieldset of the curret tab. For that I'm trying to use the ng-form directive and the function validateForm with a function like this one
$scope.validateNext = function (fieldset, nextTab) { if(validationManager.validateForm(document.querySelector('[name='+fieldset+']'))){ // $location.path("/events/event/view"); $state.go(nextTab); } };I'm obtaining this error.
Cannot read property 'elements' of undefinedI know that it's because the fieldset with a ng-form have the form controller but don't have the DOM elements of the form.
Exist a way to do this? If not. that will be a really good improvement in this plugin for validate big forms.
Here it's a simplified plunk with the error
http://plnkr.co/edit/NQCuDpccwckswy4rTHY8?p=preview