'Add a contact form'

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>
---

This partial user/ folder I attach here: https://www.dropbox.com/s/w69om92u723su9n/user.zip?dl=0 contains both the page and the theme part. It’s the bare minimum to make forms work, extracted from a site where that works. Try putting those files in your pages and theme folders and compare with what you got.

Thank you very much ♪

I am trying now and come back to you as soon as possible ☆

Unfortunaletly, I changed everything as expected, but nochange: I submit the ‘test’ then I have the error message… (see attached picture…)
[What I can’t explain … it’s that it was working … and did not touched anything… until this] Capture
What can I do now … any suggestions ?

Can you send me your user/ folder privately? (use Gitter)

P.s. don’t post your passwords in public!

Sorry but
How do you use Gitter to send it?
How can I erase my password?

Hi,
i got the same problem, after submit i get "Oops there was a problem, please check your input and submit the form again."
Did you find a solution?

Make sure your form.html.twig file, if your theme provides it, includes this line https://github.com/getgrav/grav-plugin-form/blob/develop/templates/forms/default/form.html.twig#L28

I added this line and it works now, thank you so much!