Replies: 2 comments
|
@kevinpapst I'm thinking maybe the right solution for TablerBundle would be a dedicated |
0 replies
|
Not sure what the best approach is. I can tell you what I do in Kimai. For example input-group with icon:
I have defined quite a few custom blocks for input-groups: If there is a better approach, please share, I am also interested! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I'm struggling a bit with the "right" way to handle input groups with Symfony + TablerBundle.
According to the Symfony Bootstrap docs: https://symfony.com/doc/current/form/bootstrap5.html#input-group
The recommended way is to use
row_attrwithlabelandhelp, for example:And then in Twig:
But honestly this gets messy quite fast:
form_labelhelpfor,required, etc.On the other hand, if you go fully Twig-driven and not rely on
row_attr, you keep everything (label, help, errors), but you have to manually wire the input group:This feels cleaner in terms of rendering, but now:
form_helpandform_errorsWhat do you personally use / prefer in real projects?
row_attrand custom labels?Curious to know how others handle this, because right now both approaches feel a bit wrong in different ways.
All reactions