So I have a form like this:
<form>
<input name="name" value="A. Hitchcock">
<input name="email" value="a.hitchcock@psychose.com">
<input name="name" value="Q. Tarantino">
<input name="email" value="q.tarantino@killbill.com">
...
</form>
Very simple one. It allow me to get name
and email
from my customers. With jQuery I have a button to allowing me to add more customers (name
and email
) to my form.
I need to echo these datas on each form changes, so I used this code:
$('.form-horizontal').on('change','input', function(){
var dataArray = $('#list-items').serializeArray();
});
With serializeArray()
I can serialize all my datas into an array.
My problem is to show these datas like this using this serializeArray()
:
A. Hitchcock
has this email address :a.hitchcock@psychose.com
.Q. Tarantino
has this email address :q.tarantino@killbill.com
.
Any help on how to do this please ?