$builder->add('body','text',array('label' => FALSE)//default label is displayed
$builder->add('body','text',array('label' => '')//default label is displayed
$builder->add('body','text',array('label' => 0)//default label is displayed
$builder->add('body','text',array('label' => ' ')//empty label is displayed
But I don’t need to render a label tag.
I use a form_widget(form) inthe view and I can’t use a form_row(form.field1) ... form_row(form.field25) to display a forms. I want to remove label only using a FormBuilder. It’s possible?
You can extend the default form layout using your own twig-file for your fields like this:
And afterwards you set this new form theme in the twig file which renders the form:
That’s pretty much it.
If you want to know, what are all the default values, take a look at this file in the repository: form_div_layout.html.twig