JSFiddle - React, Tailwind, and code Playground

HTML

<form><input  id="1" type="checkbox" name="pr" />&#160;Password Reset<br />
<input id="2" type="checkbox" name="ps" />&#160;Password Setup<br />
<input id="3" type="checkbox" name="fu" />&#160;Firmware Upgrade (if applicable)<br />
<input  id="4" type="checkbox" name="la" />&#160;Local Access Setup<br />
<input id="5" type="checkbox" name="ra" />&#160;Remote Access Setup<br />
<input id="6" type="checkbox" name="ma" />&#160;Mobile Access Setup<br />
<input id="7" type="checkbox" name="rss" />&#160;Recording Schedule Setup<br />
<input id="8" type="checkbox" name="pb" />&#160;How to playback video<br />
<input id="9" type="checkbox" name="cv" />&#160;How to convert video<br />
<input id="10" type="checkbox" name="en" />&#160;Email Notification Setup<br />
<input id="11" type="checkbox" name="ptz" />&#160;PTZ Setup (if applicable)<br />
    <input type="hidden" id="chcbx" value=""/>
</form>

JavaScript

var arr = [];
remove_item = function(arr,value){
    for(b in arr ){
        if(arr[b] == value){
            arr.splice(b,1);
            break;
        }
    }
    return arr;
}
var inputs = document.getElementsByTagName("input");
for(var i=0;i<inputs.length;i++)
{
    if(inputs[i].getAttribute('type') == 'checkbox')
    {  inputs[i].addEventListener("change",function() {
        if(this.checked)
            arr.push(parseInt(this.id));
        else
        {
            remove_item(arr,parseInt(this.id));
        }
            console.log(arr);  document.getElementById("chcbx").value = arr.join(",");
        },false);
    }
}