Form Wizards
First things first, what are the wizards?
It’s a sequence of forms, which goal is to simplify and restructure long form into separate and small steps. They are (supposed to be) easy to use, but they are hard to design and develop.
What is important to think about?
To make really useful wizard you need to design both user flow and experience from start to the end and beyond so it’s not just a random building blocks on one page but the thing as a whole. It should be a process represented fully as a user flow.
Validation
It’s very scary if user enter a form with every field to be highlighted as an error. They did nothing wrong, right? Well, they definitely will, but right now… Therefore, no errors on a step start.
Okey, so when to show errors? Basically, on a user action. The question is which action should it be. In most cases there are two legitimate options:
- when a data is fully entered
- when a user tries to submit a step/form
In both cases and with validation in general, we should allow a user to know about an error and track their way to fix it. Otherwise it’s a dead end and we want nothing dead in our application, right? Right?!
Flow
It’s a very generous term but for a wizard it means which indicators and actions a user has for a wizard as a whole. E.g. but not only:
- always show progress: what is current step and how much steps are left
- optionally, completeness percentage of the current step
- error indicator on steps if there are any
- action to save, exit and proceed a wizard flow
And rules of a good etiquette are:
- an option to save draft state regardless of errors
- steps amount to be consistent
- efforts to fill a form should be approximately the same from step to step
- no form data loses in any case, never
Accessibility
Good etiquette, I said? Well well, here we have more things to care about. Not least and not the last.
For a wizard to be accessible, it should have controls and indicators accessible via keyboard and, if needed, voiceable, both general flow controls and every step contents. E.g. blind users should be able to know steps amount in the beginning and the current step when they move forward.
A good support for that is a very default but very strong tool as a proper HTML base markup. You can control and enhance it with JS as much as you want, but if you don’t want to implement browser accessibility DOM features by yourself, it makes perfectly sense to build JS enhancements over already healthy base. And for wizards, the most practical tool is elements’ order so keyboard tabs going in a logical way, not visual way.
Why not visual? Well, in a visual perspective, a form is 2D object with vertical and horizontal elements. But if a user cannot see the form and only interact with it with a keyboard and a voice assistant, the same form is one-directional. You can go to the next element or a previous, or go to a menu to see anchors list and get a shortcut, but then you still need to go one direction. And to make this direction more predictable, a logic is a better tool than aesthetics.
And a tip for the implementation is CSS grid. It has two key advantages:
- visual placement depends on a CSS, not DOM order
- it’s very flexible and powerful when it comes to structuring elements
Let’s imagine you have card components structured as rows on a left and for every few of them you have some king of a summary on a right. So visually keyboard focus should go by rows first, then jump up to the top of summary and go vertically, and then repeat for the next group. And for a none-visual representation and a DOM order it should card group, then summary, then next group etc. With CSS grids, you don’t need any other tools to achieve it.
Steps dependencies
There is no limit to perfection. One more things for improvement: if the flow is self-dependent, e.g. a step data depends on the previous one, you need to plan a user flow for edits. Are you OK to reset a data if the previous changed? Do you want to block such edits? Notify a user for a data loss? There is no a good option, and you always need to choose less harmful way to solve this.
Co-operative editing
Just two thoughts on this:
- It’s very useful to be able to flawlessly edit a form with your colleagues who knows some answers better
- But is your wizard easy enough if you need extra head to solve this puzzle?
In most cases, co-op editing is not needed for wizards.
Parting wishes
Before setting off on a journey, make sure you really know your wizard plan.
It’s a dangerous business, Frodo, going out your door. You step onto the road, and if you don’t keep your feet, there’s no knowing where you might be swept off to.