Hi there ♪
I have a Contact form following the Add a contact Form documentation.
It was working well until recently: whatever I do, when the form is sent (pushing button > ‘Submit’) I egt the screen ‘There was an error please try again’.
I have reinstalled plugins email and form
I don’t know why it’s not working anymore because I haven’t touch anything directly.
I therefore wonder if it is not the update to 1.0.0.RC5?
Please help.
For information
Here is the header of the form.md file:
title: contact
form:
name: contact
fields:
- name: name
label: Name
placeholder: Enter your name
autofocus: on
autocomplete: on
type: text
validate:
required: true
- name: email
label: Email
placeholder: Enter your email address
type: email
validate:
rule: email
required: true
- name: message
label: Message
placeholder: Enter your message
type: textarea
validate:
required: true
buttons:
- type: submit
value: Submit
- type: reset
value: Reset
process:
- email:
subject: "[Site Contact Form] {{ form.value.name|e }}"
body: "{% include 'forms/data.html.twig' %}"
- save:
fileprefix: contact-
dateformat: Ymd-His-u
extension: txt
body: "{% include 'forms/data.txt.twig' %}"
- message: Thank you for getting in touch!
- display: thankyou
Here is the header of fordata.md file of folder thank you:
title: Thank you
robots: 'noindex, nofollow'
cache_enable: false
process:
twig: true
Here is the email.yaml file (informationss are accurate)
enabled: true
from: 'francois.vidit@francois-vidit.fr'
to: 'francois.vidit@francois-vidit.fr'
mailer:
engine: mail
smtp:
server: ssl0.ovh.net
port: 465
encryption: 'tls'
user: 'francois.vidit@francois-vidit.fr'
password: '3s1lambert4'
sendmail:
bin: '/usr/sbin/sendmail'
Here is the form.yaml
enabled: true
Here is the form.htm.twig of form plugin default:
{% if form.message %}<div class="alert">{{ form.message }}</div>{% endif %}
<form name="{{ form.name }}"
action="{{ form.action ? base_url ~ form.action : page.url }}"
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.classes|default('button') }}" type="{{ button.type|default('submit') }}">{{ button.value|default('Submit') }}</button>
{% endfor %}
</div>
{{ nonce_field('form', 'form-nonce') }}
</form>
---