<p>I think your checkboxes need to be as follows:</p>

<pre><code>&lt;input type="checkbox" name="fields[Classification][]" value="Hub Zone"&gt;Hub Zone
&lt;input type="checkbox" name="fields[Classification][]" value="Not Applicable"&gt;Not 
</code></pre>

CC BY-SA 3.0
2016-09-15T14:05:54.243Z
I cannot get submission value back when I added fileds[].
xyray
CC BY-SA 3.0
2016-09-15T13:30:03.457Z
2016-09-15T13:30:03.457Z
AbbeyDesign
<p>I have multiple checkboxs in a form</p>

<pre><code>&lt;input type="checkbox" name="Classification[]" value="Hub Zone"&gt;Hub Zone
&lt;input type="checkbox" name="Classification[]" value="Not Applicable"&gt;Not 
</code></pre>

<p>After submit Get info is:</p>

<pre><code> 'Classification' =&gt; 
  array (
    0 =&gt; 'Hub',
    1 =&gt; 'Not Applicable',
  ),
</code></pre>

<p>and I get error : array to string conversion on below code</p>

<pre><code> 'Classification'  =&gt; array(AttributeType::Mixed, 'required' =&gt; true, 'label' =&gt; 'Classification')
</code></pre>

<p>stack Trace:</p>

<pre><code>PHP notice
Array to string conversion

/home/www/html/www3/craft/storage/runtime/compiled_templates/3d/3df3f71b6051f05e907988ee087f2136f9ad04870a88d4a66539df50db139f6d.php(39)

27         }
28         // line 6
29         if ((array_key_exists("fields", $context) &amp;&amp; twig_length_filter($this-&gt;env, (isset($context["fields"]) ? $context["fields"] : $this-&gt;getContext($context, "fields"))))) {
30             // line 7
31             echo "    ";
32             $context['_parent'] = $context;
33             $context['_seq'] = twig_ensure_traversable((isset($context["fields"]) ? $context["fields"] : $this-&gt;getContext($context, "fields")));
34             foreach ($context['_seq'] as $context["_key"] =&gt; $context["field"]) {
35                 // line 8
36                 echo "        ";
37                 echo twig_escape_filter($this-&gt;env, $this-&gt;getAttribute($context["field"], "label", array()), "html", null, true);
38                 echo ": ";
39                 echo twig_escape_filter($this-&gt;env, $this-&gt;getAttribute($context["field"], "value", array()), "html", null, true);
40                 echo "
41 
42     ";
43             }
44             $_parent = $context['_parent'];
45             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
46             $context = array_intersect_key($context, $_parent) + $_parent;
47         }
48         // line 12
49         if ((array_key_exists("footer", $context) &amp;&amp; twig_length_filter($this-&gt;env, (isset($context["footer"]) ? $context["footer"] : $this-&gt;getContext($context, "footer"))))) {
50             // line 13
51             echo "
</code></pre>

<form><checkboxes>
form submission with checkbox list
# form submission with checkbox list

(Asked by: username_0 on 2016-09-14)

I have multiple checkboxs in a form
Hub Zone
Not 

After submit Get info is:
 'Classification' => 
  array (
    0 => 'Hub',
    1 => 'Not Applicable',
  ),

and I get error : array to string conversion on below code
 'Classification'  => array(AttributeType::Mixed, 'required' => true, 'label' => 'Classification')

stack Trace:
PHP notice
Array to string conversion

/home/www/html/www3/craft/storage/runtime/compiled_templates/3d/3df3f71b6051f05e907988ee087f2136f9ad04870a88d4a66539df50db139f6d.php(39)

27         }
28         // line 6
29         if ((array_key_exists("fields", $context) && twig_length_filter($this->env, (isset($context["fields"]) ? $context["fields"] : $this->getContext($context, "fields"))))) {
30             // line 7
31             echo "    ";
32             $context['_parent'] = $context;
33             $context['_seq'] = twig_ensure_traversable((isset($context["fields"]) ? $context["fields"] : $this->getContext($context, "fields")));
34             foreach ($context['_seq'] as $context["_key"] => $context["field"]) {
35                 // line 8
36                 echo "        ";
37                 echo twig_escape_filter($this->env, $this->getAttribute($context["field"], "label", array()), "html", null, true);
38                 echo ": ";
39                 echo twig_escape_filter($this->env, $this->getAttribute($context["field"], "value", array()), "html", null, true);
40                 echo "
41 
42     ";
43             }
44             $_parent = $context['_parent'];
45             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['field'], $context['_parent'], $context['loop']);
46             $context = array_intersect_key($context, $_parent) + $_parent;
47         }
48         // line 12
49         if ((array_key_exists("footer", $context) && twig_length_filter($this->env, (isset($context["footer"]) ? $context["footer"] : $this->getContext($context, "footer"))))) {
50             // line 13
51             echo "

**Tags:** form, checkboxes

---

## 1 answers

### Answer by username_1 on 2016-09-15. Score: 1

I think your checkboxes need to be as follows:
Hub Zone
Not

> **Comments:**
> **username_0**: I cannot get submission value back when I added fileds[].  

---

