$("form."+id+"_moduleTplLangForm").each(function(i, v){
$.each($(this).serializeArray(), function(){
formData.append('language['+i+']['+this.name+']', this.value);
});
var formFiles = $(this).find("[type='file']");
$.each(formFiles, function(){
formData.append('language['+i+']['+$(this).attr("name")+']', $(this).data("value"));
if (typeof $(this)[0].files[0] !== "undefined")
formData.append('language['+i+']['+$(this).attr("name")+']', $(this)[0].files[0]);
});
});
|