templates/platform/component/molecule/form_with_group.html.twig line 1

Open in your IDE?
  1. {% import "@component/_template/_html_macro.html.twig" as macros %}
  2. {% if componentKey is not defined %}
  3. {% set componentKey = "form_with_group" %}
  4. {% endif %}
  5. {% for k,group in formConfig.groups %}
  6. {% set groupKey = componentKey ~ '.' ~ k %}
  7. <div class="{{ group.wrapper }}">
  8. {% embed '@component/_template/_atom_wrapper.html.twig' with {value: group.title, atom_key: groupKey ~ '.link'} %}
  9. {% block atom %}
  10. {% include '@component/atom/title.html.twig' with {'title': value} %}
  11. {% endblock atom %}
  12. {% endembed %}
  13. {% for key, fieldOptions in group.fields %}
  14. {% if key not in ['_token','submit'] and form[key] is defined %}
  15. {{ macros.formRow(form[key], fieldOptions, formConfig.label_color) }}
  16. {% endif %}
  17. {% endfor %}
  18. </div>
  19. {% endfor %}
  20. {% if 'submit' not in form.children|keys %}
  21. <small class="{% if formConfig.submit.required is defined %}{{ formConfig.submit.required }}{% endif %}">* {{ 'info.contact.required'|trans }}</small>
  22. <div class="d-flex no-gutters {{ formConfig.submit.wrapper }}">
  23. <div class="{{ formConfig.submit.label }}"></div>
  24. <div class="{{ formConfig.submit.input }}">
  25. <button type="submit" class="{{ formConfig.submit.button.class }}" name="form_button" value="signin">
  26. {{ formConfig.submit.button.content }}
  27. </button>
  28. </div>
  29. </div>
  30. {% endif %}
  31. <div class="d-none">
  32. {{ form_rest(form) }}
  33. </div>