I have a form with quite a few text fields.
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.
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:
for ($i = 1; $i <= 10; $i++) {
echo '
<div>
<input type="text" maxlength="100" name="field[]">
</div>';
}
How would I combine this with the new feature where I would separate values from a bulk submission-?
foreach ($_POST as $listValue) {
echo '
<div>
<input type="text" maxlength="100" name="field[]" value='.$listValue.'">
</div>';
}