Some fields empty in email

How to fix missing form field data in ChronoForms emails.

Overview

The issue occurs when the email template uses field IDs instead of the correct field names, causing specific fields to appear empty in the sent email.
Ensure the email template uses the exact field names from the form, matching the case and spelling, rather than the field IDs.

Answered
os oschikhof 12 Oct, 2014
Hi, I have a problem with some fields in a form that are not being put into the email.
I checked several posts here at the forum, but didn't really find anything that helped so far.

When I tried to debug, it gives the following result:
Array
(
    [new] => 
    [chronoform] => Groupon
    [event] => submit
    [naam] => test
    [email] => test@test.be
    [telefoon] => 0123456789
    [Vouchercode] => 123456
    [Securitycode] => 456789
    [reserveringsdatum] => 20-10-2014
    [tijd] => 8:00
    [voorwaarden] => Yes
    [captcha] => 
    [send] => Verzenden
    [ip_address] => 77.172.xx.xxx
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
    [0] => Array
        (
            [Email] => Array
                (
                    [0] => An email with the details below was sent successfully:
                    [1] => To:, xxx@relaxensun.be
                    [2] => Subject:Uw reserveringsbevestiging is ontvangen
                    [3] => From name:Relax en Sun
                    [4] => From email:xxx@relaxensun.be
                    [5] => CC:
                    [6] => BCC:test@gmail.com
                    [7] => Reply name:
                    [8] => Reply email:
                    [9] => Attachments:
                    [10] => Body:
<p>Beste test,</p>
<p>Wij hebben uw reserveringsbevestiging met Groupon ontvangen.<br />U heeft ons de volgende gegevens verstuurd:</p>
<table>
<tbody>
<tr>
<td>Naam</td>
<td>test</td>
</tr>
<tr>
<td>Vouchercode</td>
<td></td>
</tr>
<tr>
<td>Securitycode</td>
<td></td>
</tr>
<tr>
<td>E-mailadres</td>
<td>test@test.be</td>
</tr>
<tr>
<td>Telefoon</td>
<td>0123456789</td>
</tr>
<tr>
<td>Reserveringsdatum en tijd</td>
<td>
<p>20-10-2014 8:00</p>
</td>
</tr>
<tr>
<td>Uw bericht</td>
<td></td>
</tr>
</tbody>
</table>
<p>Wij bedanken u voor uw bevestiging</p>
<p><br />Met vriendelijke groet,</p>
<p><br />Olivier<br />Relax en Sun</p><br /><br />IP: 77.172.21.216
                )

        )

    [1] => Array
        (
            [Email] => Array
                (
                    [0] => An email with the details below was sent successfully:
                    [1] => To:xxx@relaxensun.be
                    [2] => Subject:Er is een reserveringsbevesting voor Groupon binnengekomen
                    [3] => From name:Relax en Sun
                    [4] => From email:xxx@relaxensun.be
                    [5] => CC:
                    [6] => BCC:test@gmail.com
                    [7] => Reply name:
                    [8] => Reply email:
                    [9] => Attachments:
                    [10] => Body:
<p>Beste Olivier,</p>
<p>Er is een reserveringbevestiging ontvangen voor een saunabezoek via Groupon:</p>
<table>
<tbody>
<tr>
<td>Naam</td>
<td>test</td>
</tr>
<tr>
<td>Vouchercode</td>
<td></td>
</tr>
<tr>
<td>Securitycode</td>
<td></td>
</tr>
<tr>
<td>E-mailadres</td>
<td>test@test.be</td>
</tr>
<tr>
<td>Telefoon</td>
<td>0123456789</td>
</tr>
<tr>
<td>Reserveringsdatum en tijd</td>
<td>
<p>20-10-2014 8:00</p>
</td>
</tr>
<tr>
<td>Uw bericht</td>
<td></td>
</tr>
</tbody>
</table><br /><br />IP: 77.172.21.216
                )

        )

)


Somehow the voucher and securitycode are not empty when I post the form, but in the email
there empty all the time. And the other fields are filled in normally.
I have done nothing different with these 2 other fields so it's a bit strange that it doesn't work.

Anyone an idea what I am doing wrong?
Gr GreyHead 13 Oct, 2014
Hi oschikhof,

What exactly do you have in the Email template for those two inputs?

Bob
os oschikhof 13 Oct, 2014
Hi Bob,

I have used texfields and used the ID's of the fields in the template.
So the template contains {voucher_code} and {security_code} which
are equal to the field id's in the from: voucher_code and security_code

Owen
Gr GreyHead 13 Oct, 2014
Hi oschikhof,

Hmmm . . . in the debug output they show as Vouchercode and Securitycode not voucher_code and security_code

Bob
os oschikhof 13 Oct, 2014
Answer
Hi Bob,

I now see where my brother went wrong...but I didn't notice it either.
The Field ID was used in the email instead of the Field Name...
There was a capital at the beginning of the values...this was the cause.
Thanks for putting me on the right track!

Owen
This topic is locked and no more replies can be posted.