Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Save form data with field names instead of labels?

Started by Tuk Bredsdorff 7 years ago · 0 replies · 705 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 Anna, 2 days ago
2 53 16 hours ago
Forms & Blueprints · by Anna, 3 days ago
7 82 16 hours ago
Forms & Blueprints · by Anna, 1 week ago
5 186 6 days ago
Forms & Blueprints · by TomW, 1 month ago
3 379 1 month ago
Forms & Blueprints · by Japhy, 2 months ago
2 595 2 months ago