i want to add dropdown to magento custom forms fields
see below
$fieldset->addField('cadmin', 'text', array(
'name' => 'cadmin',
'label' => 'Corporate Admin',
'id' => 'cadmin',
'title' => 'Corporate Admin',
'required' => false,
));
i want to show dropdown with values from database , bascially i want to show all customer group in drop down here , how can i do it
Best Answer
If it doesn't work with
Mage::getModel('customer/group')->getCollection()->toOptionHash()
try withMage::getModel('customer/group')->getCollection()->toOptionArray()