fields.html.twig 706 B

1234567891011121314151617
  1. {% set fields = prepare_form_fields(fields, name) %}
  2. {% set originalValue = null %}
  3. {% if fields|length %}
  4. {% block outer_markup_field_open %}{% endblock %}
  5. {% for field_name, field in fields %}
  6. {% set value = form ? form.value(field.name) : data.value(field.name) %}
  7. {% set field_templates = include_form_field(field.type, field_layout, fallback_field ?? 'text') %}
  8. {% block inner_markup_field_open %}{% endblock %}
  9. {% block field %}
  10. {% include field_templates %}
  11. {% endblock %}
  12. {% block inner_markup_field_close %}{% endblock %}
  13. {% endfor %}
  14. {% block outer_markup_field_close %}{% endblock %}
  15. {% else %}
  16. {% block empty_fields_markup %}{% endblock %}
  17. {% endif %}