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?
Here is the code I use to put
values (ending with 's') is for a select field: try value (singular)
sorry about that, try this instead:
Assuming $entity is the object you're working with, after the $fieldset declaration:
$entity->setData('assign_color_new[]', $entity_id['colorcode']);
Check out Mage_Adminhtml_Block_Customer_Edit_Tab_Account (line 142) to see how the core do it.