I want to group fields in symfony2. For example wrap them in a div and place headlines in between:
<form>
<div class="step-1">
<h3>Step 1</h3>
Field 1
Field 2
</div>
<div class="step-2">
<h3>Step 2</h3>
Field 3
Field 4
</div>
</form>
The problem is the form got very much fields so i cant render them one by one in the template. Isnt there any option when adding fields? Like:
$form = $this->createFormBuilder()
->addGroup('step-1')
Or how can i handle this?