Adding a new input field on click [solved]

Adding a new input field on click [solved]

I made a file which allows users to add input fields by clicking a link: http://johnimbong.com/labs/adding_fields.php

But after you click the link the first time, clicking it a second time won't work anymore. In the end I was only able to insert one new input field. Can anyone tell me what I'm doing wrong?

I also noticed that the newly created fields don't have any events working on them. It's like the events don't even exist.