{% if form is null %} {% set form = grav.session.getFlashObject('form') %} {% endif %} {% if form.message %} {% if form.inline_errors and form.messages %}
{% else %} {% endif %} {% endif %} {% set scope = scope ?: 'data.' %} {% set multipart = '' %} {% set method = form.method|upper|default('POST') %} {% for field in form.fields %} {% if (method == 'POST' and field.type == 'file') %} {% set multipart = ' enctype="multipart/form-data"' %} {% endif %} {% endfor %} {% set action = form.action ? base_url ~ form.action : base_url ~ page.route ~ uri.params %} {% if (action == base_url_relative) %} {% set action = base_url_relative ~ '/' ~ page.slug %} {% endif %}