Open purplespider opened 4 months ago
Sounds sensible. It should probably be an opt-in and target the next minor release (i.e. the 6
branch).
There's docs about setting up and using build tooling in https://docs.silverstripe.org/en/5/contributing/build_tooling/, and most everything else you should need to know is in https://docs.silverstripe.org/en/5/contributing/code/ - but let me know if you get stuck and I'll see how I can help.
Description
Currently, on a multistep form with required fields, a user cannot progress to the next step unless they have completed all the required fields on the current step.
This can be frustrating for users, as they cannot click through all the steps to first check what data is required before starting to complete the form.
It would be nice to have an option that disables field validation for the current step when switching to a different step.
Looking through the code, this should be relatively easy to implement, as it already allows you to jump to a "viewed" step, if the current step is invalid. It looks like the following changes would be required:
error-container
, trigger validation. (If a user attempts to submit a form with validation issues, it already presents a list of links to steps with issues, but when clicking one of these steps, it should ideally highlight the invalid fields by initiating validation.)If the above sounds ok, I'd be happy to give this a bash, but will need some basic pointers on getting the tooling up and running. Thanks!
Additional context or points of discussion
No response
Validations