Symfony2 - How to put label and input for checkboxes/radios in a same line?

后端 未结 9 1803
一向
一向 2020-12-13 10:25

In my form I have some checkboxes, but by default, I have :

  • the first radio widget
  • the first label
  • the second radio widget
  • th
9条回答
  •  别那么骄傲
    2020-12-13 10:56

    A label is pretty trivial, so I personally preferred to render it manually.

    Quick and dirty in your twig:

    
    

    I would have liked if Symfony had a simpler solution for this but whatever.

    Of course the above answers are perhaps more elegant and what not. ;)

提交回复
热议问题