Reset: true doesn't work in modular contact page
01Kuzma opened this issue · 1 comments
01Kuzma commented
Hi!
I have a one page website with modular pages. One of its contain a contact form.
It works fine, but the problem is that the reset: true
option doesn’t work after submit. The sent data is left in the form and it could be sent once more.
I’ve tried leaving only minimum code parts with two fields, but this doesn’t make any sense.
Grav CMS 1.7.30
Form v5.1.6
pages\01.home
contains modular.lt.md
with:
content:
items: '@self.modular'
The form is placed in the contact.lt.md
:
---
title: 'Title'
menu: kontaktai
visible: true
cache_enable: false
form:
name: kontaktu-forma
template: form-messages
fields:
-
name: email
label: false
placeholder: 'e.mail'
type: email
outerclasses: form-field
classes: full-width
-
name: my-file
label: 'Add files'
type: file
multiple: true
limit: 5
filesize: 6
destination: user/data/files
accept:
- application/pdf
- application/x-pdf
- 'image/*'
-
name: telephone
label: false
placeholder: Telephone
type: tel
validate:
required: true
-
name: message
label: false
placeholder: 'Info'
type: textarea
outerclasses: form-field
classes: full-width
rows: null
buttons:
-
type: submit
value: Submit
outerclasses: form-field
classes: 'full-width btn--primary'
process:
-
email:
from:
- '{{ form.value.email|e }}'
to:
- '{{ config.plugins.email.to }}'
subject: '[Message from] {{ form.value.name|e }}'
body: '{% include ''forms/data.html.twig'' %}'
attachments:
- my-file
-
reset: true
-
message: 'Thank you message'
metadata:
'og:url': 'url'
'og:type': website
'og:title': 'title'
'og:author': author
addressTitle: 'Title'
published: true
aura:
pagetype: website
media_order: '1.jpg,2.jpg'
---
Form text
Tried with quark
theme but after submission the same code redirects to a blank page with "thank you" message
01Kuzma commented
The problem was in template: form-messages