In previous post we learnt how to render custom html in tabs block. Now lets add custom JavaScript in Magento admin form. Magento is flexible enough to insert your custom JavaScript code snippets in forms created by your very own Magento modules & extensions. You can put setAfterElementHtml method right after addField as shown below. $field = $fieldset->addField('title', 'text', array( 'label' => Mage::helper('module')->__('Title'), 'name' => 'title', 'required' => true, 'class' => 'required-entry input-text', )); $field->setAfterElementHtml('<script> //< ![C // here goes your custom Javascript //]]> </script>');
Magento
Add custom Javascript in Magento admin form
In previous post we learnt how to render custom html in tabs block. Now lets add custom JavaScript in Magento admin form. Magento is flexible enough to insert y
· 5 min read
Related posts
Magento
Magento 1: Export manufacturers CSV by specific store view
This post will guide you on how you can export the manufacturer list (Magento 1.9) to CSV file. In this script, I am filtering the list by store view. Let’
Magento
Magento 1: Export catalog categories for a specific store view
In this post you will learn how you can export Magento 1.9 categories for a specific store view as CSV. For example, you have Arabic store view with ID 7, and y
Magento
Search Magento products by product labels
Project Overview: Task was to develop a Product Labels Magento extension. Where admin can create product labels by uploading an image, enter label title and att