Skip to content

Commit

Permalink
Add a condition to check if there is a field (sonata-project#4451)
Browse files Browse the repository at this point in the history
  • Loading branch information
axzx authored and jordisala1991 committed Apr 12, 2017
1 parent f703676 commit 5c3bdb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/views/CRUD/base_edit_form_macro.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<p>{{ form_group.description|raw }}</p>
{% endif %}

{% for field_name in form_group.fields if admin.formfielddescriptions[field_name] is defined %}
{% for field_name in form_group.fields if form[field_name] is defined %}
{{ form_row(form[field_name])}}
{% else %}
<em>{{ 'message_form_group_empty'|trans({}, 'SonataAdminBundle') }}</em>
Expand Down

0 comments on commit 5c3bdb3

Please sign in to comment.