'How to render ChoiceType- Checkboxes in a row
Lately i have problems with rendering some Symfony5 Forms. The mater sounds quit trivial, but i was unable to fix it, as of now:
When rendering a Symfony5 Form input field (which is a ChoiceType) with twig, the default way of displaying seems to be that all the choices are rendered as columns below each other. As can be seen below:
Does anyone know how i can get the output in a row ( or a table of like 5x2)?
EDIT:
I solved this issue in the following way, maybe it helps someone save some time:
-The solution is in the twig file, not in the symfony-form. The choices can be rendered as a list, which than can be modified with CSS (float: left). It is necessary (at least in the way i did it) that the choices are specified independently, and not as form_row:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|



