open-formulieren / open-forms

Smart and dynamic forms
https://open-forms.readthedocs.io
Other
36 stars 26 forks source link

Provide extra "save" option for users who went back to a step to change a field. #3121

Open LaurensBurger opened 1 year ago

LaurensBurger commented 1 year ago

Thema / Theme

Frontend

Omschrijving / Description

As a user i want to make sure my changes are saved, when i check my submission overview data ans spot a mistake i follow the link back to this part of the form and change the mistake - but this change is not saved! i need to click: "Next" for the change to save. This is not very intuitive, how does the user know they need to click next? and with forms that exceed my screen height there is also extra scrolling involved to get to this button.

Enhancement: If a user is going back to a step, enable a dynamic "save" button that appears next to any field that was changed: image After saving the button should be removed again

Added value / Toegevoegde waarde

No response

Aanvullende opmerkingen / Additional context

No response

sergei-maertens commented 1 year ago

reasonable request, but not trivial - we perform input validation on progressing to the next step and only when the data validates server-side is it persisted. This creates different forms of ambiguity, so we'll have to properly design the user interactions and implications here.

hlmr-erik commented 8 months ago

The way it functions now is indeed not intuitive at all, as I've heard from a few of our first-time users. If this cannot be resolved for example the way Laurens suggested, I would opt disabling links in the menu or making them optional. In that case, better to leave the menu just as an index; then a user would have to use the next/previous buttons to navigate.

sergei-maertens commented 8 months ago

A middle ground could be to also persist un-saved inputs in the browser sessionStorage, this may create a challenge of brinding a third source of state into the form but it would integrate best since we don't need to persist anything server side and the API interaction would remain the same.

The logic could be:

  1. On step load, fetch backend data (if present) and merge with optional session storage state (dirty)
  2. On input change, write the (dirty) state to the session storage
  3. On step submit/next -> clear session storage state

We have to be careful that we don't overwrite user inputs with stale session storage state here. One option would be to maybe only write to session storage when navigating away from the current page, but detection will have to be very robust for that.

sergei-maertens commented 8 months ago

Either way - this will require a stakeholder before we can start work on this :grimacing:

LaurensBurger commented 3 months ago

Another suggestion: If i went back to change a value - do not show the "next" button, but instead show a button to go back to the overview. This will prevent users thinking they need to "next" all the way back to the end of the form again.