Collect all [name=files]
first then pass it to your $.post
.
I assume what's inside <div id="files">
is all inputs with [name=files]
function autosave_form_cl(session_name){
//console.log($("input[name=files]").val() + $('#title').val());
files = [];
$('div#id').find('input').each(function(i,inp){
files.push($(inp).val());
});
console.log(files);
$.post("/act_autosave_formdata.php", {
session_name:session_name,
cellphone: $('#cellphone').val(),
files: files
} );
}
Let me know if it works.