title: How to set value of checkbox in magento custom module
body: <p>How do I set the value of a checkbox in a magento custom module? Also, how do I set the name of the checkbox to the value in an array?</p>
  
  <p>Here is the code I use to put the checkbox in a magento module:</p>
  
  <pre><code>$fieldset-&gt;addField($entity_id['colorcode'], 'checkbox', array(
        'label'     =&gt; Mage::helper('selectcolorforimage')-&gt;__($entity_id['colorcode']),
        'name'      =&gt;'assign_color_new[]',
        'values'    =&gt;$entity_id['colorcode']
  
    )); 
  </code></pre>