{% trans_default_domain "admin" %}
{% if config.form is not empty %}
{{ form_start(config.form) }}
{{ form_errors(config.form) }}
{% if config.form.vars.grouping is defined and config.form.vars.grouping is not empty %}
{% for label, groups in config.form.vars.grouping %}
{% set isLast = (loop.index == config.form.vars.grouping|length) %}
{# Determine if its necessary to add the checkbox, if we only have 1 element we shouldn't bother #}
{% set addCheckbox = true %}
{% if config.form.children._token is defined %}
{% set addCheckbox = config.form.children|length > 2 %}
{% else %}
{% set addCheckbox = config.form.children > 1 %}
{% endif %}
{% for child in config.form.children %}
{% if child.vars.name != '_token' %}