Magento – How to create a your own dropdown for system configuration

Posted on Updated on

We can use our own system configurations in magento. Creating a drop down on our own manageable way of code will be benefited. Followings are the steps you could follow. This is only the way of magento. There are other methods too

1. Create your own module or use your existing module and Create a system configuration file
2. Add system configuration as follows

<sample_config_select translate=”label”>
<label>sample label</label>
<tooltip>adds select</tooltip>

3. create options. we follow the way of magento structure or use your own.

class YourPackage_Module_Model_Sample

public function toOptionArray()
return array(
array(‘value’ => 0, ‘label’ => Mage::helper(‘adminhtml’)->__(‘select option 1’)),
array(‘value’ => 1, ‘label’ => Mage::helper(‘adminhtml’)->__(select option 2′)));


4. See the Configuration in Admin