I have 4 input textfields, and a single textfield that should collect values from each.
<input type="text" class="collector">
<input type="text" class="collected">
<input type="text" class="collected">
<input type="text" class="collected">
<input type="text" class="collected">
The collected inputs are text and expected to be inserted into collector as is. So NULL should be sent too along with those with values.
The collector expects to look like: Data 1 | Null | Data 3 | Data 4
So Null is accepted when no value is given, simply to maintain the process of explode and implode by PHP.
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:
$('input.collector').val($(".collected").text());
Any hint is very much appreciated. Thanks