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

Save form data with field names instead of labels?

Started by Tuk Bredsdorff 7 years ago · 0 replies · 614 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 Japhy, 2 weeks ago
2 268 4 days ago
Forms & Blueprints · by FrViPofm, 4 weeks ago
5 328 4 weeks ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2318 8 months ago
Forms & Blueprints · by Hugo Oliveira, 9 months ago
0 780 9 months ago
Forms & Blueprints · by Flachy Joe, 10 months ago
9 870 10 months ago