Collect several input fields and insert into a single field with jquery
<p>I have 4 input textfields, and a single textfield that should collect values from each.</p>

<pre><code>&lt;input type="text" class="collector"&gt;

&lt;input type="text" class="collected"&gt;
&lt;input type="text" class="collected"&gt;
&lt;input type="text" class="collected"&gt;
&lt;input type="text" class="collected"&gt;
</code></pre>

<p>The <strong>collected</strong> inputs are text and expected to be inserted into <strong>collector</strong> as is. 
So NULL should be sent too along with those with values.</p>

<p>The collector expects to look like:
<strong>Data 1 | Null | Data 3 | Data 4</strong></p>

<p>So Null is accepted when no value is given, simply to maintain the process of explode and implode by PHP.</p>

<p>I am stuck, my jquery only picks one of them, because I don't know how to aggregate the separate collected values into an array:</p>

<pre><code>$('input.collector').val($(".collected").text());
</code></pre>

<p>Any hint is very much appreciated. Thanks</p>
