Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Form fields in email are looking strange

solved

Solved by elisabetta View solution

Started by elisabetta 5 years ago · 3 replies · 622 views
5 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
5 years ago

It would be better to post answer separately and mark it as a solution

5 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 Rene, 1 week ago
2 46 1 week ago
Plugins · by Xavier, 4 weeks ago
2 55 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1181 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 49 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 73 2 months ago