Displaying form field results on auto responder {{ this.formSubmissionData.fields.system.xxxx.value }}

Setting up an auto responder, HTML layout for a form submission.

If Hello {{ this.formSubmissionData.fields.system.firstname.value }}
puts in the users first name into the html auto responder layout, does this apply to all other data fields?

For example, I have a string of text that = name of the event.
Field name is EventDateRegistration. It’s not a date field/ or data, raw text.

Form field html

<label for="EventDateRegistration">Event Date Registration</label>
<input type="text" id="EventDateRegistration"  name="EventDateRegistration"  value="{{this['Name']}}" readonly >

Tried this in the html auto responder but does not work.
{{ this.formSubmissionData.fields.system.EventDateRegistration.value }}

Hi @Megan

I guess the easiest way of finding out is pasting “{{ this.formSubmissionData }}” into you form submission site or directly in the mail, to see where this field is located :slight_smile:

My guess is that it is under “custom” instead of “system” - so something like:
{{ this.formSubmissionData.fields.custom.EventDateRegistration.value }}

1 Like

Hello Peter, yes, you are right. System fields is only this:

Okies thanks for your help @Peter-Schmidt yes, that is what I have in place on the auto responder, but it does not populate when email is received.

Copy of code —
Thank you for booking in for a breakfast meeting with BNG for <strong>{{ this.formSubmissionData.fields.system.EventDateRegistration.value }}</strong>

Are you suggesting that it is only possible for those system fields shown on the form builder? Or it should pass the value to the email based on my string used?

Oh drat. I missed the string contents of .system.

<strong>{{ this.formSubmissionData.fields.system.EventDateRegistration.value }}</strong>

should be .custom not .system int the string…

**{{ this.formSubmissionData.fields.custom.EventDateRegistration.value }}</strong>**

Thanks again @Peter-Schmidt :+1:

Working form auto responder. :slight_smile:

Exactly - Glad that you got it working @Megan :+1:

I’m trying to get a hidden form field to display in the workflow email but it doesnt seem to be passing the value through. So would love to have some fresh eye across it.

Here’s what I have in the form, which is a simple custom field to capture ip address;

<input type="hidden" id="Ip" name="Ip" value="{{request.request_data.Ip}}">

It is definitely producing the Ip Value on the page when the form is loaded - so the data is available

In the workflow email I have the following:

<span style="font-size: 12px;">ip address: {{this.formSubmissionData.fields.custom.Ip.value}}</span>

Based on it being a custom field I thought this would be correct, but all I’m getting is the html text, but the value for the Ip field is not ending up in the email.

Can anyone highlight where I’m going wrong?

Thanks in advance

Hi @intrigue
What you have should work. It could perhaps be a bug.
Is your site now on v6.1.4? perhaps check this again if it has just been upgraded.

Thanks Adam
that’s what I thought too, but currently not passing through to the email at all
the site is a live one on version 5.9.5

Could it be a capitilaisation or spacing thing?
I’m pretty sure I’ve tried all the options on that though in the elimination process but sometimes these things can be right in front of your face and not see it

It does sit below the usual submissions fields so not sure if that would cause any issues but I’m assuming it wouldn’t impact

<table class="tabledefault" cellpadding="0" cellspacing="0" width="100%" style="max-width: 300px;">
<tbody>
<tr>
<td style=""><strong>Summary of web form submission: {{formName}}</strong><br><br></td>
</tr>
{% assign allFields = this.formSubmissionData.fields.all %} {% for item in allFields %} {% assign index = forloop.index -1 %} {% assign fieldName = allFields[index].name %} {% assign fieldValue = allFields[index].value %}
<tr>
<td>
<strong>{{fieldName}}</strong><br>
<span style="color: #66cc00;">{{fieldValue}}</span>
</td>
</tr>
{% endfor %}
<tr>
<td>
<br><br><em><span style="font-size: 12px;">ip address: {{this.formSubmissionData.fields.custom.Ip.value}}</span></em><br>
</td>
</tr>
</tbody>
</table>

I’ve run tests similar to your setup in both 5.9.5 and 6.1.4 and this works fine in all cases.

Does the IP field display correctly in your forloop in the workflow email? or is it missing there as well?