Skip to content

Error Text in Bootstrap 4 Form Layout #52352

Open
@asispts

Description

@asispts

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions