Saturday, 29 June 2013

Adding link, image or text in the magento admin form

Lot of time developer stuck and not find how to add a link or image or text in the Magento Admin Form.
Here is the steps.

Go to you module admin form.
Generaly path like
app/code/CODEPOOL/Yourmodulename/Block/Adminhtml/Yourmodulename/Edit/Tab/Form.php


Go to the field you like to add link, image or text

$fieldset->addField('status', 'select', array(
'label' => Mage::helper('reviewproduct')->__('Status'),
'name' => 'status',
'values' => array(
array(
'value' => 1,
'label' => Mage::helper('reviewproduct')->__('Enabled'),
),

array(
'value' => 2,
'label' => Mage::helper('reviewproduct')->__('Disabled'),
),
),
'after_element_html' => ''
));


Thanks and Enjoy!

No comments :

Post a Comment