{% if isnew %}
    {% set form_url =  path('mapbender_manager_application_savelayerset', { 'slug': application.slug}) %}
{% else %}
    {% set form_url =  path('mapbender_manager_application_savelayerset_1', { 'slug': application.slug, 'layersetId': form.vars.data.id}) %}
{% endif %}

{{ form_start(form, {"attr": {"id": "layersetForm", "novalidate": "novalidate", "action": form_url}}) }}
    {{form_label(form.title)}}{{form_widget(form.title)}}
    {{ form_row(form._token) }}
{{ form_end(form) }}