-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activate Accordion or Tab on validation error #1728
Comments
Is there any current demo on which this issue can be reproduced or can you post a minimalistic code to reproduce? |
@mvorisek No, there is not yet an example but it is very simple: If you have a form with an Accordion layout inside, and one field does not validate, the form is reloaded on save, the error message is attached to the failing field, but the user can't see it if the field is in one of the (closed) Accordions. Very confusing for the user. This also would apply to tabs I assume. Improved behaviour: If validation fails, for the first invalid field that is inside an Accordion, that Accordion is activated automatically. @ibelar something for you eventually? |
Accordion Section activate on error is/was supported and was fixed by #1863. This issue is about general support. A test for Accordion and Tab should be added. And both must be activated even if insined nested structure, like Accordion->Tab->Tab->Accordion->section with an error. |
https://app.codecov.io/gh/atk4/ui/pull/2032/blob/src/Form/Layout/Section/Accordion.php - needs to be covered by a Behat test |
I am using heavily Acccordion sections to structure forms (e.g. Customer, Address, Payment, Shipping, Tax) - the way I do this is to make one form, and inside the form we have the Accordions.
However if a Validation for a field inside a closed Accordion fails, it seems to the user nothing happens on Submit. Can we automatically open the Accordion(s) where fields with failed Validation messages are present?
The text was updated successfully, but these errors were encountered: