title: Passing a javascript array to a form / $_POST without ajax
body: <p>I'm working on a form upload element that can be used in the Zend Framework forms. I'm trying to make it so the programmer can use it in any project without having to manually configuring any settings.</p>
  
  <p>The files are uploaded by an AJAX uploader which returns JSON data like:</p>
  
  <pre><code>[
    {
        "name":"image.png",
        "size":42410,
        "type":"image\/png",
        "url":"http:\/\/example.com\/image.png",
        "thumbnail_url":"http:\/\/example.com\/thumbnail\/image.png",
     }
  ]
  </code></pre>
  
  <p>Since the uploader itself is a form element I'm trying to put that data in the form so on the submit the values can be retrieved from the $_POST.
  I was adding hidden input fields with javascript named uploader-data[] (when submitting the form) but that only allows me to pass 1 variable at the time to the hidden field.</p>
  
  <p>So I guess my question is: "How can I pass the whole array/object to the $_POST / form?". Even though I am using AJAX for the uploader itself I don't want to use it to submit the form. I want a regular form submit containing all the data from the JSON object/array. The files itself are already uploaded but I might want to use the JSON data in my database or at some other place.</p>
  
  <p>Is it possible to do something like this?</p>
  
  <p>Thanks in advance.</p>