Hi everyone
I’ve been trying grav for a while now and like it very much. I don’t have a local server and put everything directly on a test folder online with my provider. I still am having fights via FTP to find the proper folders now and then, but other than that I think I can manage.
I have an odd issue I cannot wrap my head around: I’ve played around with the Deliver Theme and with SoraArticle and decided to run with the latter. The main issue is, that I cannot for the sake of me make the contact form work. With the Deliver theme the mails were sent just fine. With SoraArticle I can’t seem to make it work. The settings of the mail plugin are identical that’s why I assume it is an issue with the theme.
I tried to compare the forms from both the themes and they appear to work completely differently.
I noticed the following behaviour:
- The form checks for required fields just fine and displays a callout if a mandatory field is missing
- Once I submit the form, it is emptied and I get no message confirmation and no rendering of the thankyou page
- The mail is not sent
Something I’ve noticed and that might have nothing to do with it. I changed the language in the site config to DE. All pages I’ve created fresh are marked with .de. The skeleton pages from the themes don’t have that. I’ve installed the admin plugin and tried to modify the below form.md to understand if there was somekind of validation error. Interestingly, after the modification the file was named form.de.md but didn’t change functionality.
As said, I don’t have the issue with the Deliver theme why I suppose it’s not the plugin. I re-installed SoraArticle from scratch, because I feared I have messed with files that I shouldn’t have touched, but the problem persists. Any help would be very much appreciated.
I went through http://learn.getgrav.org/forms/forms to understand if I missed something or if there might not be write permission on the user/data folder, but to no avail unfortunately. May I include my user/pages/03.contact/form.md if anyone could help me?
title: Kontakt
form:
name: my-nice-form
fields:
- name: name
label: Name
placeholder: Geben Sie Ihren Namen ein
autofocus: on
autocomplete: on
type: text
validate:
required: true
- name: email
label: E-Mail
placeholder: Geben Sie Ihre Mail Adresse ein
type: text
validate:
rule: email
required: true
- name: message
label: Nachricht
size: long
placeholder: Schreiben Sie Ihre Nachricht...
type: textarea
validate:
required: true
buttons:
- type: submit
value: Senden
classes: gdlr-button with-border excerpt-read-more
process:
- email:
from: "{{ config.plugins.email.from }}"
to:
- "{{ config.plugins.email.from }}"
- "{{ form.value.email }}"
subject: "[Feedback] {{ form.value.name|e }}"
body: "{% include 'forms/data.html.twig' %}"
- save:
fileprefix: feedback-
dateformat: Ymd-His-u
extension: txt
body: "{% include 'forms/data.txt.twig' %}"
- message: Vielen Dank für Ihre Nachricht. Für schnelle und einfache Abklärungen sind wir gerne telefonisch erreichbar!
- display: thankyou
---