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

[BUG] Is invalid class being added when visibility changes #20

Closed
JoeyDaems opened this issue Feb 23, 2024 · 1 comment
Closed

[BUG] Is invalid class being added when visibility changes #20

JoeyDaems opened this issue Feb 23, 2024 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@JoeyDaems
Copy link

Hi,

On this page, we have a form that uses the built-in conditional logic to show/hide two input fields.
The two fields should be required when they are visible, so I add validation based on if they are visible or not.
The problem we are facing is when the fields become visible (they are hidden by default), the class is-invalid automatically gets added to the fields resulting in the fields looking like they were incorrectly submitted while this isn't the case.

The project is using pimcore version 10.6.3 and formbuilder version 4.5.0 with js-pimcore-formbuilder version 1.0.8.

Did we set it up wrong, or is this a bug?

Here is what's happening:

278988813-4fad2615-85f3-4f02-9b50-09969c817bb2.mov
270966132-b249cb36-150b-495f-817c-1708f23ddcf2 270966145-dfdcbaeb-0949-44f6-b6d6-4c360f30163c

Thanks in advance!

@pascalmoser
Copy link
Member

Hi, thank you for the detailed description.
Yes, the class is-invalid should only be set if the form has already been submitted.

@solverat solverat added this to the 1.1.0 milestone Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants