I can't find a category called "forms" so I will post this in "Internals".
Following scenario: I have to build a scaffolding solution for an admin interface. Now I am stuck at the form generation:
{% block content %}
{{ form('/admin/' ~ controller ~ '/add', 'class': 'ui form') }}
{% for element in form %}
<div class="field">
{{ element }}
</div>
{% endfor %}
{% endblock %}
This works quiet well. But I can't find a solution to render the associated field label. So I need a way to iterate over a form and print out the labels, error messages and so on.
Maybe there is already a solution within this forum. I can't find any. Any ideas?
THX