Comments (6)
For this reason, the validity of the form is false until all required fields are filled out throughout the entire form within each step
Sounds about right. If a field is required, then your form cannot be valid until those fields are filled.
Whether you wrap your form around or within the step container, it should have roughly the same result: each form element in Angular registers itself with its parent form when created and de-registers itself when destroyed. For that reason, the reported validity is for the currently present form elements.
from angular-multi-step-form.
Ok, I understand that. Is my issue not something that is essential for a multistep form, though?
It's a multistep-form, meaning it's one form with mulitple steps. I'd like to disable the 'Next' button until the fields in the current step are valid, not all fields in the form.
from angular-multi-step-form.
That sounds a bit weird, it shouldn't normally be concerned about validity of other steps as only elements for the current step are present.
from angular-multi-step-form.
I've just done some more tests and it does seem like the module is fussy about where the <form>
tags are placed. Interestingly, ng-model validation does not work at all if the <form>
tags are placed around the step-container; valid is always true. I believe the same can be said for the validation within the module, validation does not appear to function if the form tags are not within the step-container.
Once I place the <form>
tag within the step template, everything works as expected but I want to avoid using a new<form>
tag for every step as I have > 20 steps in 4 forms.
Thanks again
from angular-multi-step-form.
Using a <form>
tag in every step is not really an issue. Only one is present at any time. I would recommend doing it that way, it probably removes a few edge cases.
I need to have a look anyway.
from angular-multi-step-form.
Yeh ok, it does seem to do the trick. I had it in my mind that I'd end up with loads of objects at the end but the data is tied to ng-model, not the form name. Cheers.
from angular-multi-step-form.
Related Issues (20)
- Can it support check required fields on each step form HOT 2
- may we have to add setStep function HOT 1
- Dynamic Add Step HOT 4
- Is there any demo? HOT 3
- Dynamically appending steps on form element click HOT 1
- Angular Can't inject multiStepFormInstance HOT 4
- On Next button click validate the form HOT 3
- Please share code of examples? HOT 2
- Multi-step form with status wizard HOT 1
- How can we inject new services to multiStepFormModule ?
- How to post data or call rest service by clicking the button on last step in multistep form?
- How to inject nextStep programatically? HOT 1
- TypeScript Support HOT 1
- Is it possible to save data with a searchId ?
- Setting default 'valid' value for Step
- scope variables not available in step
- Is it possible to navigate to another step apart from Step1, when html Link is provided for multi-step-form? HOT 1
- Question: Can it be used with angular 4 ? HOT 1
- angular 4 and bootstrap 3.7 + HOT 4
- Examples are not accessible HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-multi-step-form.