Add checkbox with label to a form
This is not meant to be a comprehensive answer:

If you do not want a bug that happens only in some browsers and only some of the time, use a safe, conservative format as an id

checkBox.setAttribute( 'id',   unique + '_id' );


If id is a random 64-bit integer or a GUID in the following form (b362e877-95c3-4e88-99dc-ceb4600639b5), then you would want id to be 'id_' + unique instead of unique + '_id'