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.

Forms & Blueprints

Save form data with field names instead of labels?

Started by Tuk Bredsdorff 7 years ago · 0 replies · 463 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, 5 years ago
13 1145 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 67 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 142 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 118 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 136 7 months ago