I think this is a simple question. About the release of errors. This is my twig file:
<table>
<tr>
<td>{{ form_label(form.dueDate) }}</td>
<td>{{ form_widget(form.dueDate) }}</td>
<td>{{ form_errors(form.dueDate) }}</td>
</tr>
<tr>
<td>{{ form_label(form.task) }}</td>
<td>{{ form_widget(form.task) }}</td>
<td>{{ form_errors(form.task) }}</td>
</tr>
</table>
Now each error displays (td using form_errors ()) as:
<ul> <li> This value must not be empty </li> </UL>
My question: I want to output the error as plain text (without ul and li).
I know there is such an example:
{% for error in errors %}
{{ error.message }}
{% endfor %}
But this will output errors one by one. I want to show them where there is a specific input:
<td> {{myErrorFor form.dueDate}} </TD>
Thanks so much for any help
source
share