collecting data from formfields to append to the post script.
var dataString = 'name='+ name + '&company_name='+ company_name + '&adres='+ adres + '&zip='+ zip + '&city='+ city + '&email=' + email + '&phone=' + phone + '&message=' + message + '&imgs=' ;
But the last value imgs can be multiple values added trough an ajax upload script and is generated dynamicly i created a hidden form field, but dont know how to pass the hidden form vars to the datastring, who can help me out here?
//Add uploaded file to list
if(response==="success"){
$('<li></li>').appendTo('#files').html('<input name="image" class="img" type="hidden" value="mailatt/'+file+'" /><img src="mailatt/'+file+'" alt="" width="300" /><br /><p>'+file+'</p>').addClass('success');
} else{
$('<li></li>').appendTo('#files').text(file).addClass('error');
}
var dataString = $("#testform").serialize();