Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save idcmardelplata/5140629 to your computer and use it in GitHub Desktop.
Save idcmardelplata/5140629 to your computer and use it in GitHub Desktop.
Twig: Capa paraun formulario.
{% extends 'Form/form_div_layout.html.twig' %}
{#
Extends from Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
Overrides the form_errors block so it no longer uses transchoice (which
was causing a problem).
#}
{% block form_errors %}
{% spaceless %}
{% if errors|length > 0 %}
<ul>
{% for error in errors %}
<li>{{
error.messageTemplate|trans(error.messageParameters, 'validators')
}}</li>
{% endfor %}
</ul>
{% endif %}
{% endspaceless %}
{% endblock form_errors %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment