cloneNode loses form field states in IE6 & IE7

The DOM method cloneNode(true) seems to have a problem in IE 6/7 when relating to form fields. Certain form fields (checkboxes, radio elements and select boxes) will lose their current state after doing a cloneNode(true).

To view the problem, view this page in IE 6 or 7 and then make changes to the form below and click the "Clone Node" button. Only changes to the text field will actually be cloned to the new node. All other field changes are lost.

To fix this MSIE issue, you can simply copy the innerHTML contents from the original element to the cloned element. Click the "Clone Node w/Fix" button to see the fix in action.

I'm a checkbox

Choice 1 Choice 2 Choice 3

Enter text: (Text fields clone just fine)

Make selection: