Closed
Description
It could be nice to explain how to display a message introducting that submission failed due to some filling errors.
To detect if form contains errors I check the used method (if POST then form is not valid)
{% if app.request.method == "POST" %} {# there must be a better way #}
<p>Your form contains errors, please check it again.</p>
{% endif %}
<form action="{{ path('myEntity_create') }}" method="post" {{ form_enctype(form) }}>
{{ form_widget(form) }}
<p><button type="submit">Create</button></p>
</form>
I'm sure (or I wish) there is a better way to do it but I don't want to introduce a new variable from the controller...