I have a form and group of checkboxes in it. (These checkboxes are dynamically created but I dont think it is important for this question). The code that generates them look
Add extra script according to your checkbox group:
HTML Code:
Select All Red Blue Green Black