Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Form fields in email are looking strange

solved

Solved by elisabetta View solution

Started by elisabetta 6 years ago · 3 replies · 894 views
6 years ago

Hi all!
Before updating "form" plugin to ver.5 I had the following form fields in the submitted email:

Name : John Doe
Email : [email protected]
Message : This is a test message
What is five times eight?: honeypot-correct-choice
Please accept our privacy policy: Yes

After updating I have this:

This is a test message

John Doe
[email protected]

basically the email submitted now isn't so clear as before, when all the relevant fields were clearly written in bold and followed by the related values,; moreover the validation of honeypot and of Privacy policy fields is missing.
I use grav with gantry 5 template, both updated to the latest version available.
I also opened an issue in Grav-form plugin #503
Is there way to revert to the previous version display?

last edited 02/23/21 by pamtbaau
6 years ago Solution

SOLVED I used this code in frontmatter

TWIG
email:
   from:
      mail: '{{ config.plugins.email.from }}'
   to:
      mail: '{{ form.value.email }}'
      name: '{{ form.value.name|e }}'
   reply_to: '{{ form.value.email }}'
   subject: '[Contact] New message from {{ form.value.name|e }}'
   body: '{% include ''forms/data.html.twig'' %}'
last edited 02/23/21 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Plugins · by complanar, 6 days ago
6 262 2 days ago
Plugins · by BenLaKnet, 3 days ago
1 93 3 days ago
Plugins · by complanar, 4 weeks ago
2 414 3 weeks ago
Plugins · by Vladimir Novak, 2 months ago
3 705 2 months ago
Plugins · by Mathieu Lecouturier, 2 months ago
3 544 2 months ago