Skip to content
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

Open
mkrecek234 opened this issue Jan 20, 2022 · 4 comments
Open

Activate Accordion or Tab on validation error #1728

mkrecek234 opened this issue Jan 20, 2022 · 4 comments

Comments

@mkrecek234
Copy link
Contributor

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?

@mvorisek
Copy link
Member

Is there any current demo on which this issue can be reproduced or can you post a minimalistic code to reproduce?

@mvorisek mvorisek added the JS label May 21, 2022
@mkrecek234 mkrecek234 changed the title Feature request: Activate Accordion on Validation error Feature request: Activate Accordion or Tab on Validation error Aug 7, 2022
@mkrecek234
Copy link
Contributor Author

mkrecek234 commented Aug 7, 2022

@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?

@mvorisek mvorisek changed the title Feature request: Activate Accordion or Tab on Validation error Activate Accordion or Tab on validation error Oct 2, 2022
@mvorisek
Copy link
Member

mvorisek commented Oct 2, 2022

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.

@mvorisek
Copy link
Member

mvorisek commented May 7, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants