{% macro form(form_data, formaction, title = "", hiddenid = "", nosubmit = false, idprefix = "") %} {% import "Froxlor/form/formfields.html.twig" as formfields %}
{% for sid,section in form_data.sections %} {% if section.visible is not defined or (section.visible is defined and section.visible == true) %}
{% if section.title is not empty %}
{% if section.image is not empty %} {% endif %} {{ section.title }}
{% endif %}
{% for id,field in section.fields %} {{ formfields.fieldrow(id, field) }} {% endfor %}
{% endif %} {% endfor %} {% if nosubmit == false %}
{% if hiddenid is not empty %} {% endif %}
{% if form_data.buttons is defined and form_data.buttons is iterable %} {% for btn in form_data.buttons %} {% endfor %} {% else %} {% endif %}
{% endif %} * {{ lng('panel.mandatoryfield') }}
{# add translation for custom validations #} {% if form_data.id is defined and form_data.id in ['customer_add', 'customer_edit', 'domain_add', 'domain_edit'] %} {% endif %} {% endmacro %}