<p>If you go with the <code>message[]</code> array syntax, then all other fields must use the same syntax.</p>

<p><a href="https://github.com/craftcms/contact-form#adding-additional-fields" rel="nofollow noreferrer">https://github.com/craftcms/contact-form#adding-additional-fields</a></p>

<p>So this should solve it:</p>

<pre><code>&lt;input id="fromEmail" type="email" name="message[fromEmail]" value="{% if message is defined %}{{ message.messageFields['fromEmail'] }}{% endif %}" required&gt;
</code></pre>

CC BY-SA 4.0
2019-07-30T19:35:40.400Z
I'm getting the following error on the form now: "Your Email cannot be blank." It's not registering the input for some reason?
Pirate727
CC BY-SA 4.0
2019-07-30T19:37:56.060Z
That validation error appears below the email field when I try to submit.
Pirate727
CC BY-SA 4.0
2019-07-25T22:53:55.010Z
2019-07-25T22:53:55.010Z
Brad Bell
<p>New to Craft CMS and trying to solve a mystery.  When this contact form sends, the recipients don't get the email field.  We get the others, including the consent, but the email field is missing.  Any help would be appreciated.</p>

<p>Here's the code.  Is there somewhere else it could be missing from?</p>

<pre><code>{% macro errorList(errors) %}
    {% if errors %}
        {% includeJsFile(siteUrl~'js/validate-form.js') %}
        {% includeJsFile(siteUrl~'js/contact-scroll.js') %}
        &lt;ul class="errors"&gt;
            {% for error in errors %}
                &lt;li&gt;{{ error }}&lt;/li&gt;
            {% endfor %}
        &lt;/ul&gt;
    {% endif %}
{% endmacro %}

{% from _self import errorList %}

&lt;form method="post" action="" accept-charset="UTF-8" id="ask-scigrip"&gt;
    {{ getCsrfInput() }}
    &lt;input type="hidden" name="action" value="contactForm/sendMessage"&gt;
    &lt;input type="hidden" name="redirect" value="contact/thanks"&gt;
    &lt;input type="hidden" name="toEmail" id="toEmail" value="{{ 'info@scigrip.com'|hash }}"&gt;
    &lt;input id="composite" name="composite" type="text"&gt;
    &lt;div class="form-group"&gt;
      &lt;p style="font-size:11px;text-align:left;padding-top:0;padding-left:0;"&gt;
        &lt;strong&gt;Your Data Permissions&lt;/strong&gt;&lt;br&gt;
        Under the new GDPR Regulations. We require your consent to use the above data we collect from you.
        We use this data to send you various communications for product updates and marketing purposes.
        This information will be sent by periodic emails to your email address.
        To enable us to do this you must check the below consent box.
        The data we hold for you will be inline with our privacy policy which can be &lt;a href="/privacy-policy" target="_blank" style="color:#ffffff;text-decoration:underline;"&gt;viewed here.&lt;/a&gt;
        &lt;br&gt;If you do not consent then we will only use your information for this enquiry and only hold it for the time it takes to finalise your request.
        &lt;br&gt;&lt;label for="gdprConsent" style="width: 100px;"&gt;I Consent&lt;/label&gt;&lt;input id="gdprConsent" type="checkbox" name="message[GDPR][]" value="Consent Given" style="width:30px;margin-top:17px;"&gt;
      &lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
    &lt;label for="message"&gt;{{ 'POST YOUR QUESTION HERE' | translate }}&lt;/label&gt;
    &lt;input id="message" name="message[body]" value="{% if message is defined %}{{ message.message }}{% endif %}" required&gt;
    {{ message is defined and message ? errorList(message.getErrors('message')) }}
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
    &lt;label for="fromEmail"&gt;{{ 'WHAT IS YOUR EMAIL?' | translate }}&lt;/label&gt;
    &lt;input id="fromEmail" type="email" name="fromEmail" value="{% if message is defined %}{{ message.fromEmail }}{% endif %}" required&gt;
    {{ message is defined and message ? errorList(message.getErrors('fromEmail')) }}
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
    &lt;label for="firstName"&gt;{{ 'TELL US YOUR NAME' | translate }}&lt;/label&gt;
    &lt;input id="firstName" type="text" name="message[FirstName]" value="{% if message is defined %}{{ message.messageFields['FirstName'] }}{% endif %}" class="inp-sml"&gt;
    &lt;button type="submit" id="submit" name="submit" value="SEND"&gt;ASK SCIGRIP &lt;i class="glyphicon glyphicon-triangle-right"&gt;&lt;/i&gt;&lt;/button&gt;
    &lt;/div&gt;
    {#&lt;div class="form-group"&gt;
    &lt;input type="submit" value="Send"&gt;
    &lt;button type="submit" id="submit" name="submit" value="SEND"&gt;SEND&lt;/button&gt;
    &lt;/div&gt;#}
&lt;/form&gt;
</code></pre>

<plugin-contactform>
Email Field Being Dropped on sendMessage (Craft Contact Form Plugin)
# Email Field Being Dropped on sendMessage (Craft Contact Form Plugin)

(Asked by: username_0 on 2019-07-24)

New to Craft CMS and trying to solve a mystery.  When this contact form sends, the recipients don't get the email field.  We get the others, including the consent, but the email field is missing.  Any help would be appreciated.
Here's the code.  Is there somewhere else it could be missing from?
{% macro errorList(errors) %}
    {% if errors %}
        {% includeJsFile(siteUrl~'js/validate-form.js') %}
        {% includeJsFile(siteUrl~'js/contact-scroll.js') %}
        
            {% for error in errors %}
                {{ error }}
            {% endfor %}
        
    {% endif %}
{% endmacro %}

{% from _self import errorList %}


    {{ getCsrfInput() }}
    
    
    
    
    
      
        Your Data Permissions
        Under the new GDPR Regulations. We require your consent to use the above data we collect from you.
        We use this data to send you various communications for product updates and marketing purposes.
        This information will be sent by periodic emails to your email address.
        To enable us to do this you must check the below consent box.
        The data we hold for you will be inline with our privacy policy which can be viewed here.
        If you do not consent then we will only use your information for this enquiry and only hold it for the time it takes to finalise your request.
        I Consent
      
    
    
    {{ 'POST YOUR QUESTION HERE' | translate }}
    
    {{ message is defined and message ? errorList(message.getErrors('message')) }}
    
    
    {{ 'WHAT IS YOUR EMAIL?' | translate }}
    
    {{ message is defined and message ? errorList(message.getErrors('fromEmail')) }}
    
    
    {{ 'TELL US YOUR NAME' | translate }}
    
    ASK SCIGRIP 
    
    {#
    
    SEND
    #}

**Tags:** plugin-contactform


---

## 1 answers

### Answer by username_1 on 2019-07-25. Score: 0

If you go with the message[] array syntax, then all other fields must use the same syntax.
https://github.com/craftcms/contact-form#adding-additional-fields
So this should solve it:

> **Comments:**
> **username_0**: I'm getting the following error on the form now: "Your Email cannot be blank." It's not registering the input for some reason?  
> **username_0**: That validation error appears below the email field when I try to submit.  

---

