In my theme, there’s a theme option page. I want my users to be able to add any number of texts fields as they want.
$(document).ready(function () {
(function () {
$('.dd').on('click', '.addRow', function () {
var start = $('#fields'),
newRow = $('<input type="text" class="quantity" /><br><br>');
$(start).append(newRow);
});
})();
});
<div class="dd">
<div id="fields">
<input type="text" class="quantity" /><br><br>
</div>
<p class="addRow">Add a Row</p>
<input type="submit" id="submit" />
</div>
This is how I implemented it on just HTML and JS.
Now I want to store these data in the WordPress DB. So, how this is going to work? How can I integrate PHP with these virtual text fields?
Thanks!