I am trying to dynamically generate an input field by following a tutorial , somehow the tutorial are using old version of Jquery , now i trying to get it done by using the latest jquery
this is the tutorial i follow on old tutorial
No problem in cloning but i cannot generate the input with different name
eg.
<input name="name1" value="">
<input name="name2" value="">
<input name="name3" value="">
Here is my testing code
fiddle demo
Thanks in advance
SOLVED with
<input name="name[]" value="">
Simple solution!
<input name="name[]" ... />This will send the data as an array, and it won’t matter how many times it gets cloned.