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.