Closed kaspar-allenbach closed 1 year ago
Should be {{ submission.message.firstName }}
But also something like this should help if you want to print out the label and value.
{% for key, value in submission.message %}
{% if value is iterable %}
{% for item in value %}
<p>{{ key|ucfirst }}: {{ item|nl2br }}</p>
{% endfor %}
{% else %}
<p>{{ key|ucfirst }}: {{ value|nl2br }}</p>
{% endif %}
{% endfor %}
I try to create a decent human readable template.
Craft CMS: 3.7.63.1 php 8.1.1
How do I print a field within the message field:
If I have:
<input type="text" id="message" name="message[firstName]" value="" autocomplete="firstName" required="true">
in the E-Mail
{{ submission.message[firstName] }}
is not working.
Variable "firstName" does not exist.
Any idea about E-Mail Submission templating?