I have a form in a backend module making use of some dynamically created checkboxes, done thusly:
$allStores = Mage::app()->getStores();
foreach ($allStores as $stores) {
$store = Mage::app()->getStore($stores);
$values[] = array('value' => $store->getId(), 'label' => $store->getFrontendName());
}
$fieldset->addField('checkboxes', 'checkboxes', array(
'label' => 'stuff',
'name' => 'boxes',
'values'=> $values,
));
Now for this particular example I have two stores, with respective IDs 1 and 2. I would assume that this would return an array, or string value containing either 1, 2 or 1 and 2. If I select both boxes, it returns 2, if I select store ID 2, it returns 2, if I select store ID 1, it returns 1. If checkboxes are not what I’m wanting to use here, what do I need to use to obtain multiple values from one field? I assume that this should be capable of it, or it had might as well be radio buttons.
Check your html source
This is probably yours:
This is what it should be:
I don’t know magento but a shot in the dark, I believe you might need to change your code to: