I have this form:
jQuery
(function($) {
AddTableRow = function() {
var newRow = $("<tr>");
var cols = "";
cols += '<td><input type="text" name="dados[][nome]" id="dados[][nome]" class="form-control" value=""></td>';
cols += '<td><input type="text" name="dados[][nome]" id="dados[][nome]" class="form-control" value=""></td>';
cols += '<td><input type="text" name="dados[][nome]" id="dados[][nome]" class="form-control" value=""></td>';
cols += '<td><input type="text" name="dados[][nome]" id="dados[][nome]" class="form-control" value=""></td>';
cols += '<td>';
cols += '<button onclick="RemoveTableRow(this)" type="button"><span class="fa fa-minus"></button></button>';
cols += '</td>';
newRow.append(cols);
$("#convidados-table").append(newRow);
return false;
};
})(jQuery);
To understand better, I modified the code ... How would I make this setting for array?