grav-theme-libretic/templates/forms/form.html.twig

22 lines
633 B
Twig
Raw Normal View History

2015-01-15 19:15:54 +01:00
<div class="alert">{{ form.message }}</div>
<form name="{{ form.name }}"
action="{{ uri.rootUrl ~ (form.action|default(page.route)) }}"
method="{{ form.method|upper|default('POST') }}">
{% for field in form.fields %}
{% set value = form.value(field.name) %}
<div>
{% include "forms/fields/#{field.type}/#{field.type}.html.twig" %}
</div>
{% endfor %}
<div class="buttons">
{% for button in form.buttons %}
<button class="button" type="{{ button.type|default('submit') }}">{{ button.value|default('Submit') }}</button>
{% endfor %}
</div>
2015-12-18 10:56:34 +01:00
{{ nonce_field('form', 'form-nonce') }}
2015-01-15 19:15:54 +01:00
</form>