Keep the id/name of the original element

Updated code to keep the id and name of the original element in the new element so it's easier to retrieve the selected values on the server side.

Please review the code as it was the first time for me doing something with Coffee script.