Answers.Body: <p>You're pretty close. In your input you have <code>name="message[type][]"</code>. The little <code>[]</code> at the end there means means the data will be stored in an array, something like:</p>
  
  <pre><code>submission: {
    message: {
      type: ['New', 'Used']
    }
  }
  </code></pre>
  
  <p>You have two options here:</p>
  
  <p><strong>Option one</strong></p>
  
  <p>You can change your inputs to be <code>name="message[type]"</code> instead of <code>[type][]</code>. This should result in a data structure more like you're expecting </p>
  
  <pre><code>submission: {
    message: {
      type: 'New'
    }
  }
  </code></pre>
  
  <p>Then your conditional check can be kind of like you have it, but this won't allow multiple values (not sure if you want those or not).</p>
  
  <p><strong>Option Two</strong></p>
  
  <p>Update your conditional check and output to properly output the array values. This would mean something more like:</p>
  
  <pre><code>{% for type in submission.message.type %}
    &lt;p style="font-size: 16px; line-height: 1.625; color: #51545E; margin: .4em 0 1.1875em;"&gt;
      Type of Quote: {{ submission.message.type }}
    &lt;/p&gt;
  {% endfor %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-24T15:19:38.980Z
Answers.LastActivityDate: 2019-10-24T15:19:38.980Z
Answers.UserDisplayName: brianjhanson
Body: <p>Cannot for the life of me get checkbox values to display in a HTML email template using the Contact Form extensions plugin.</p>
  
  <p>Form snippet:</p>
  
  <pre><code>&lt;input type="hidden" name="message[type]" value=""&gt;
  &lt;p&gt;&lt;input type="checkbox" class="styled-checkbox" name="message[type][]" id="New" value="New"&gt;
  &lt;label for="New"&gt;New&lt;/label&gt;&lt;/p&gt;
  &lt;p&gt;&lt;input type="checkbox" class="styled-checkbox" name="message[type][]" id="Used" value="Used"&gt;
  &lt;label for="Used"&gt;Used&lt;/label&gt;&lt;/p&gt;
  </code></pre>
  
  <p>And the email template snippet:</p>
  
  <pre><code>{% if submission.message['type'] %}
  &lt;p style="font-size: 16px; line-height: 1.625; color: #51545E; margin: .4em 0 1.1875em;"&gt;Type of Quote: {{ submission.message['type'] }}&lt;/p&gt;
  {% endif %}
  </code></pre>
  
  <p>Does anyone have a clue about this? I have tried many variations, the above is just one of them. Pulling my hair out ;)</p>
  
  <p>TIA!</p>
  
Tags: <plugin-contactform><plugin-contactformextensions>
Title: Contact Form Extensions - Checkbox Templating
ThreadText: # Contact Form Extensions - Checkbox Templating
  
  (Asked by: username_0 on 2019-10-19)
  
  Cannot for the life of me get checkbox values to display in a HTML email template using the Contact Form extensions plugin.
  
  Form snippet:
  
  ```
  <input type="hidden" name="message[type]" value="">
  <p><input type="checkbox" class="styled-checkbox" name="message[type][]" id="New" value="New">
  <label for="New">New</label></p>
  <p><input type="checkbox" class="styled-checkbox" name="message[type][]" id="Used" value="Used">
  <label for="Used">Used</label></p>
  
  ```
  
  And the email template snippet:
  
  ```
  {% if submission.message['type'] %}
  <p style="font-size: 16px; line-height: 1.625; color: #51545E; margin: .4em 0 1.1875em;">Type of Quote: {{ submission.message['type'] }}</p>
  {% endif %}
  
  ```
  
  Does anyone have a clue about this? I have tried many variations, the above is just one of them. Pulling my hair out ;)
  
  TIA!
  
  **Tags:** plugin-contactform, plugin-contactformextensions
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-10-24. Score: 1
  
  You're pretty close. In your input you have `name="message[type][]"`. The little `[]` at the end there means means the data will be stored in an array, something like:
  
  ```
  submission: {
    message: {
      type: ['New', 'Used']
    }
  }
  
  ```
  
  You have two options here:
  
  **Option one**
  
  You can change your inputs to be `name="message[type]"` instead of `[type][]`. This should result in a data structure more like you're expecting
  
  ```
  submission: {
    message: {
      type: 'New'
    }
  }
  
  ```
  
  Then your conditional check can be kind of like you have it, but this won't allow multiple values (not sure if you want those or not).
  
  **Option Two**
  
  Update your conditional check and output to properly output the array values. This would mean something more like:
  
  ```
  {% for type in submission.message.type %}
    <p style="font-size: 16px; line-height: 1.625; color: #51545E; margin: .4em 0 1.1875em;">
      Type of Quote: {{ submission.message.type }}
    </p>
  {% endfor %}
  
  ```
  
  
  ---
  
  