Symfony2 Twig: Conditionally display form errors in Twig views

This will only show form errors if there are any in your form view.

{% if form_errors(form)!='' %}

{{ form_errors(form) }}

{% endif %}

About Author:

Senior Cloud Software Engineer and 25+ years experienced video production, video editing and 3D animation services for a variety of global clients including local video production here in Jacksonville, Florida.

Leave a Comment

Your email address will not be published. Required fields are marked *