0
I have a form in which it is created dynamically using the method append. The result is something in this format:
$('#form').append("<tr><td class='td-min'><input value='"+item.role+"'"+
+" name='"+item.prefix+"' type='checkbox'/> "+item.role+"</td></tr>'");
Above would be basically a form item, in which a list of items is generated dynamically.
Below, using AJAX, is how I intend to record in the database, however I do not know with redeem the values of checkbox. Behold:
jQuery('#form').submit(function(){
var dados = jQuery(this).serialize();
jQuery.ajax({
type: "POST",
url: "http://api.server.com/resgata",
success: function( data )
{
}
});
return false;
});
How to redeem values from checkbox's dynamic (both checked how much unchecked) in the form using the method serialize()? It is possible?
When referring to the values you refer to the
checkedorvalue?– Klaider
@Matheus
checkedas it says in the question itself.– viana