Simple forms post field specific field values

101 Views Asked by At

I am using simpleforms as a subscription form for subscribing to classes. The form uses a use_as and also sends the email to the sender as a confirmation.

I have edited the email twig template and added further informatie about what the subscriber should do next.

My question is if it is possible to set a specific field value in the instruction text. So far I have not yet been able to do this correctly. I would like to only show the field "name:" in this instruction text so that every sender that gets this email is greeted with his own name.

The for loop that is used in the email template is

{% for value in form %} {{ value }} {% endfor %}

And i'm looking for a specific field to be set instead of all the values of the form.

1

There are 1 best solutions below

0
On

You can directly access the fields in your emailtemplate, you don't need to use a loop for it.

So if you have a field called 'name' in your config file you can use {{ form.name }} in the email template to display the value that the visitor has entered directly.