Propose new functionalities for Decidim software
#DecidimRoadmap Designing Decidim together
Survey - Don’t allow user access to the next step in case of error
Is your feature request related to a problem? Please describe.
Admins can create surveys with mandatory or non-mandatory questions over several steps. The user can move from one step to another by clicking on "next" and at the last step he/she clicks on "submit". It is at the moment of submission that the verification of the validity of the information entered is done. So, if there is any errors, the user isn’t informed until the end. In addition, the error message is not explicit, doesn’t indicate where there was an error and does not redirect the user to the field(s) or step concerned.
Describe the solution you'd like
When filling in the fields for a survey if not all mandatory fields are filled, it would be appropriate to :
- Not being able to access to the next step.
- Display an error message.
- Highlight in red the field.
Describe alternatives you've considered
In case that is not possible to do the verification at each step, we could also imagine that if there is any error, the entire form is displayed with all the fields with wrong information highlight so that the user can correct them.
Does this issue could impact on users private data?
No
Funded by
Could be funded by the city of Toulouse
List of Endorsements
Report inappropriate content
Is this content inappropriate?
2 comments
Actually, this was already spotted when the step feature was developed, see https://github.com/decidim/decidim/pull/6108#pullrequestreview-416159973
I think the easiest alternative is to display the step with the error automatically after submitting. This could be done with a little bit of javascript.
Hello @microstudi thank you for your answer 😁 indeed I didn't notice that this was already reported
I agree with your solution! display the step with the error will certainly avoid the confusion of the users.
If there are errors in many steps, how do you imagine the behaviour?
I think it would be appropriate to redirect the user to the first step where the error was detected, then move to all the other next steps (the fields must be filled in with the previously entered data) and if there is an error on a field he will be able to see it highlighted in red. What do you think?
Add your comment
Sign in with your account or sign up to add your comment.
Loading comments ...