I am using the following template to extend specific widget
{% use 'SonataAdminBundle:Form:form_admin_fields.html.twig' %}
{% form_theme form _self %}
{% block textarea_widget %}
{% spaceless %}
<div class="textarea_widget">
<textarea {{ block('widget_attributes') }}>{{ value|raw }}
</textarea>
</div>
{% endspaceless %}
{% endblock textarea_widget %}
The main problem is that it’s reaching maximum function nesting. There must be some infinite recursion when extending template. When i copied code from extended template everything works. Any idea how to make this working?
to fix this error i needed to create form_admin_fields.html.twig file in app/Resources/SonataAdmin/views/Form with the following content:
So there is no necessity to use or extend template just redefine some block.