List values into text fields
<p>I have a form with quite a few text fields. </p>

<p>I would like to add a functionality where I would add a textarea where user can drop multiple values, perhaps one per line, and on submit, populate those values into text fields of my form.</p>

<p>I use PHP and jQuery on this page. Something tells me I should go with PHP and do a loop for 
$_POST. Am I on the right track? I build the text fields via a loop anyway, on page load:</p>

<pre><code>for ($i = 1; $i &lt;= 10; $i++) {
    echo '
    &lt;div&gt;
        &lt;input type="text" maxlength="100" name="field[]"&gt;
    &lt;/div&gt;';
}
</code></pre>

<p>How would I combine this with the new feature where I would separate values from a bulk submission-?</p>

<pre><code>foreach ($_POST as $listValue) {
    echo '
    &lt;div&gt;
        &lt;input type="text" maxlength="100" name="field[]" value='.$listValue.'"&gt;
    &lt;/div&gt;';
}
</code></pre>
