Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Save form data with field names instead of labels?

Started by Tuk Bredsdorff 7 years ago · 0 replies · 566 views
7 years ago

I would like to show form data with field names instead of labels in the html email that gets sent when my form is saved.

I have tried to replace

<strong>{{ field.label|t|e }}</strong>

with

<strong>{{ field.name|t|e }}</strong>

in forms/data.html.twig but then no email is sent. I get no error message either.

I can print the field name with {{ dump(field.name) }} so I don't understand why it won't print but then I'm also a Grav/Twig noob.

Any ideas?

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by FrViPofm, 5 days ago
5 100 4 days ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2119 7 months ago
Forms & Blueprints · by Hugo Oliveira, 8 months ago
0 605 8 months ago
Forms & Blueprints · by Flachy Joe, 9 months ago
9 695 9 months ago
Forms & Blueprints · by Augustus, 10 months ago
7 741 10 months ago