I just started with GRAV this week, coming from many years with Joomla + Rockettheme. I’m using Gantry 5 with Helium. I’ve mostly figured things out, but I can’t solve an issue with getting a contact form to work with or without CAPTCHA. I started with pasting the basic form from learn GRAV in a form.md page. I only changed the name. I added the sendmail and CAPTCHA (v2 Invisible) site/secret info in Email and Form plugins.
---
title: Contact
form:
name: contact
fields:
name:
label: Name
placeholder: 'Enter your name'
autocomplete: 'on'
type: text
validate:
required: true
email:
label: Email
placeholder: 'Enter your email address'
type: email
validate:
required: true
message:
label: Message
placeholder: 'Enter your message'
type: textarea
validate:
required: true
buttons:
submit:
type: submit
value: Submit
reset:
type: reset
value: Reset
process:
save:
fileprefix: contact-
dateformat: Ymd-His-u
extension: txt
body: '{% include ''forms/data.txt.twig'' %}'
email:
to: #######@knyghtlyarmes.com
from: ######@knyghtlyarmes.com
subject: '[Site Contact Form] {{ form.value.name|e }}'
body: '{% include ''forms/data.html.twig'' %}'
message: 'Thank you for getting in touch!'
---
# Send us an Email
Whenever I clicked the Send button, I received an error that “No Secret Provided” (below) even though the info was in the plugin.
I tried adding the site and secret keys directly in the form.md file just to see if it would work. I then got an error that the “to” and “from” emails were missing even though they were in the plugin. I added them directly into the form.md file and it appeared to work, but no email was actually sent. I stripped out the CAPTCHA portion of the script (as shown above) just to make sure that wasn’t the problem. It is still not sending an email. I then changed the email plugin from sendmail to SMTP and provided the account info in the plugin. It is still not sending an email. I have verified all the SMTP info is correct. I cannot figure out why the site is not sending emails. It seems like the site is not accessing the info entered into the appropriate plugins. The entire site is only a few days old and everything is up to date.