When I build these I seem to always forget the core conclusions I come to every time.
It should still be a single <form> element.
If there is no JS all fields should be rendered.
Progress on submit, not on clicking a next button.
If render as a single form we don't have to worry about maintaining input state on the server/session, it can all be done in memory which is how we think of it anyway.
If you make the submit event the driver you can centralize the validation and form progression.
on submit
all fields up to current selected valid?
progress to next section
are all fields valid?
submit data
else
update error state and render
Grouping inputs in to separate views.
When I build these I seem to always forget the core conclusions I come to every time.
<form>
element.submit
, not on clicking anext
button.If render as a single form we don't have to worry about maintaining input state on the server/session, it can all be done in memory which is how we think of it anyway.
If you make the
submit
event the driver you can centralize the validation and form progression.