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

Save form data with field names instead of labels?

Started by Tuk Bredsdorff 7 years ago · 0 replies · 541 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 Ton Haarmans, 6 years ago
13 1863 6 months ago
Forms & Blueprints · by Hugo Oliveira, 7 months ago
0 451 7 months ago
Forms & Blueprints · by Flachy Joe, 8 months ago
9 548 8 months ago
Forms & Blueprints · by Augustus, 9 months ago
7 570 9 months ago
Forms & Blueprints · by Julien, 9 months ago
10 590 9 months ago