fields.html.twig 693 B

123456789101112131415
  1. {% for field_name, field in fields %}
  2. {% if field.type and not field.validate.ignore %}
  3. {%- if field_name starts with '.' -%}
  4. {% set field_name = name ? name ~ field_name : field_name[1:] %}
  5. {% set field = field|merge({ name: field_name }) %}
  6. {% endif %}
  7. {% set value = form ? form.value(field_name) : data.value(field_name) %}
  8. {% block inner_markup_field_open %}{% endblock %}
  9. {% block field %}
  10. {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
  11. {% endblock %}
  12. {% block inner_markup_field_close %}{% endblock %}
  13. {% endif %}
  14. {% endfor %}