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

后端 未结 9 1808
一向
一向 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:52

    Putting the form input inside the label tag would result in broken HTML.

    What is your goal? If you are simply looking to make the label and input show on the same line in the browser, then you could use css:

    input, label {
     display: inline;
    }
    

提交回复
热议问题