I would like in the form builder controller to say this field belongs to this group then in the view/theme organize all of group1 into div1, group2 into div2, etc..
I tried something like this (creating sub forms) but that is not working; I am not able to display the group
$builder->add(
$builder->create('group1', FormType::class, array('inherit_data' => true))
->add('brand', TextType::class, array(
'label' => 'brand',
'invalid_message' => 'Enter a brand',
))
);
twig
{{ form_row(form.group1) }}