title: Multiple Input Hidden Field Elements using Zend Form
body: <p>I am encountering a requirement where I need to use multiple hidden field elements. The values for these elements are stored in an array. What would be the best possible approach to build that in the zend form.</p>
  
  <p>id[] = array('1', '2', '3', ....);</p>
  
  <p>This values for id[] is dynamically generated.</p>
  
  <p>And the html part for my case would look something like this</p>
  
  <pre><code>&lt;input type="hidden" name="ids[]" value="id[0]" /&gt;
  &lt;input type="hidden" name="ids[]" value="id[1]" /&gt;
  &lt;input type="hidden" name="ids[]" value="id[2]" /&gt;
  
  .
  .
  .
  </code></pre>
  
  <p>and so on.</p>
  
  <p>How can a create multiple input hidden field elements, which I later want to use it in my controller by using the populate method.</p>
  
  <p>In case if anyone has an idea how to approach this, would be really helpful.</p>
  
  <p>P.S. Im using Zend Framework 2</p>