I'm currently trying to only render specific parts of a form but for some reason, the whole form keeps getting rendered as you can see below I've used the form start and end and the whole form is still being rendered even though it should only render the start and end of the form tags.
{{ form_start(searchForm) }}
{{ form_end(searchForm) }}
Also whenever I use the code below all that happens is that the elements are being moved to the top of the form and the elements which shouldn't be rendered are rendered below.
{{ form_start(searchForm) }}
{{ form_widget(searchForm.title) }}
{{ form_widget(searchForm.title) }}
{{ form_end(searchForm) }}
As described in the doc, for don't render unrendered fields:
{{ form_end(form, {'render_rest': false}) }}
Hope this help