I've adapted a piece of code which copies fields over when a checkbox is checked. However I need this to work when a 'submit' button is clicked. I've added an event handler which runs the function once the button has been pressed. However it is not working, I'm not sure what's happening here. Here's my Fiddle http://jsfiddle.net/sui_page/z4wAr/