Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Error Text in Bootstrap 4 Form Layout #52352

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

Open
asispts opened this issue Oct 29, 2023 · 3 comments
Open

Error Text in Bootstrap 4 Form Layout #52352

asispts opened this issue Oct 29, 2023 · 3 comments

Comments

@asispts
Copy link
Contributor

asispts commented Oct 29, 2023

Symfony version(s) affected

5.4

Description

When adding a marker using CSS for required inputs and an error occurs, the marker will be shifted downward by the error text.

symfony-error-1

symfony-error-2

How to reproduce

  • Add bootstrap_4_layout.html.twig to twig form theme
  • Add a marker for required inputs in your css. For example:
label {
    &.required {
        &:after {
            content: " *";
            font-weight: bold;
            color: crimson;
            font-size: 0.9em;
        }
    }
}
  • Create a form with a required input and submit it.

Possible Solution

The error text should appear below the form label block.

Additional Context

No response

@OskarStark
Copy link
Contributor

Thanks for the bug report, can you send a PR to fix the behavior?

@asispts
Copy link
Contributor Author

asispts commented Oct 30, 2023

Sure, I will prepare the PR

@carsonbot
Copy link

Hey, thanks for your report!
There has not been a lot of activity here for a while. Is this bug still relevant? Have you managed to find a workaround?

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

4 participants