Hi, I am using Grav for the first time today. I know how to deal with HTML, CSS, Javascript and web related stuff. So, I am not a newbie on that part.
I am trying to create a blog where I can create pages that can display: code segments, youtube videos, images, and forms.
I am trying to discover if Grav can do that.
Anyway, I am now trying to create a form. I have managed to create the form as a new page. I have also managed to insert a form on an existing page.
I have to say that this was an herculean task, because the help is written for the expert and has a lot of gaps and missing information, make it indecipherable for the beginner.
Every time I send a form, using a VALID EMAIL, I see this message
Address in mailbox given [] does not comply with RFC 2822, 3.6.2.
and a detailed page that shows paths inside my server that I would not like the user to see.
also, notice that the array [] is empty, what is amazing, because I am filling the email on the form.
This is the code I have added to the form:
title: Contact
form:
name: contact-form
template: form-messages
refresh_prevention: true
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'
autocomplete: 'on'
type: email
validate:
required: true
-
name: message
label: Message
type: textarea
validate:
required: false
buttons:
-
type: submit
value: Submit
-
type: reset
value: Reset
process:
-
email:
from: '{{ config.plugins.email.from }}'
to:
- '{{ config.plugins.email.to }}'
- '{{ 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: 'Thank for your message. We will answer as soon as possible.'
-
display: thankyou
Two questions:
- how do I make the form work?
- how do I disable this detailed message showing parameters and variables from inside the server?
Thanks