title: Using form name attribute to submit an array of maps with mutliple fields
body: <p>This is mainly an HTML question, I'd say fully an HTML question with a hint of phoenix just because I'm using that framework.</p>
  <p>I'm incompetent in nested html form names.</p>
  <p>I want to format an array like this:</p>
  <pre><code>item_favorites =&gt; [
   %{item_id = 1, sort_order = 1},
   %{item_id = 1, sort_order = 1}
  ]
  </code></pre>
  <p>I've tried this:</p>
  <pre><code>&lt;%= select f, :item_id, @fulfilled_select_items, name: &quot;item_favorite[item_id]&quot; %&gt;
  &lt;%= hidden_input f, :sort_order, name: &quot;item_favorite[sort_order]&quot; %&gt;
  </code></pre>
  <p>and get</p>
  <pre><code>%{
    &quot;item_favorite&quot; =&gt; %{&quot;item_id&quot; =&gt; &quot;&quot;, &quot;sort_order&quot; =&gt; &quot;&quot;}
  }
  </code></pre>
  <p>This is sort of what I want...but I want an array of this.  My form has more than one <code>item_favorite</code></p>
  <p>I've also tried this:</p>
  <pre><code>name: &quot;item_favorites[][item_id]&quot;
  </code></pre>
  <p>which gives me</p>
  <pre><code>%{
    &quot;item_favorites&quot; =&gt; [
      %{&quot;item_id&quot; =&gt; &quot;1&quot;},
      %{&quot;sort_order&quot; =&gt; &quot;&quot;},
      %{&quot;item_id&quot; =&gt; &quot;511&quot;},
      %{&quot;sort_order&quot; =&gt; &quot;&quot;},
      %{&quot;item_id&quot; =&gt; &quot;&quot;},
      %{&quot;sort_order&quot; =&gt; &quot;&quot;}
    ]
  }
  </code></pre>
  <p>whereas i want:</p>
  <pre><code>%{
    &quot;item_favorites&quot; =&gt; [
      %{&quot;item_id&quot; =&gt; 1, &quot;sort_order&quot; =&gt; &quot;&quot;},
      %{&quot;item_id&quot; =&gt; 512, &quot;sort_order&quot; =&gt; &quot;&quot;},
      %{&quot;item_id&quot; =&gt; &quot;&quot;, &quot;sort_order&quot; =&gt; &quot;&quot;},
    ]
  }
  </code></pre>
  <p>Any ideas?</p>