I need to change the multi-select attributes in the admin product edit form to multiple checkbox attributes. Is this possible?

2 Answers 2


After long research, I did some workarounds on this and yes it did the job. Here are my findings

Magento 1.9 doesn't allow to create a multiple checkbox attribute from the backend. It has some predefined input types but not multiple checkboxes.

I created a module for writing an observer for the event


My module config.xml will look like follows.

<?xml version="1.0"?>


Next, write an observer model for handling the event. It should be Company/Mymodule/Model/Observer.php


class Bootworld_Product_Model_Observer
  public function addRenderer($observer)
    $form = $observer->getForm();

    //array of attribute codes of multi-select fields which you want to 
    //convert to checkboxes 

    $fields = array( 
     "multiselect_field_1", //attribute code



    foreach ($fields as $element) {
        $field = $form->getElement($element);

        if ($field) {

            //set the renderer block of the element 
            //Define a block in your module Campany/Mymodule/Block




Create a block file in Block folder of your module, In this example, it gonna be in the path Company / Mymodule / Block / Adminhtml / Edit / Tab / Attribute.php

class Company_Mymodule_Block_Adminhtml_Edit_Tab_Attribute extends Mage_Adminhtml_Block_Widget implements Varien_Data_Form_Element_Renderer_Interface
   public function __construct()


Last and final step create a template file in app/design/adminhtml/default/default/comapny/mymodule/edit/multiplecheckboxes.phtml for itrating the values ( multiselect options) and display it with checkbox.


   $_htmlId = $this->getElement()->getHtmlId();
   $_htmlClass = $this->getElement()->getClass();
   $_htmlName = $this->getElement()->getName();
   $_values = $this->getElement()->getValue();

   //get attribute 

   $attribute = 
     Mage::getModel('eav/entity_attribute')- >loadByCode('catalog_product', 

   //values collection of attribute options 

   $valuesCollection = 
                            ->setStoreFilter(0, false);                            

   $_values = explode(',',$_values); //attribute values

   <td class="label"><?php echo $this->getElement()->getLabel(); ?></td>
   <td colspan="10" class="grid tier">

  <ul class="checkbox"> 
    <?php foreach($valuesCollection->getData() as $value): ?>

     <li> <input type="checkbox" name="<?php echo $_htmlName ?>" value="<?php 
          echo $value['option_id']?>" <?php echo 
          in_array($value['option_id'],$_values) ? 'checked' : '' ?> id="<?php 
          echo $value['option_id']?>" /> 
         <label for="<?php echo $value['option_id']?>"><?php echo 
          $value['value'] ?>

   <?php endforeach;?>    
 ul.checkbox li { 
 border: 1px solid; 
 padding: 5px;


There is no option in magento for change the attribute type from one to another.

After create the attribute,you can't edit the attribute type. It will show in disable mode,refer the below screenshot.

attribute edit page

And also magento don't have an attribute type like "Multiple checkbox". "Multiple Select" attribute type is working like a multiple checkbox.

Refer the below screenshot for checking available attribute types in Magento.

attribute types

Thank you..

  • Thank you for the immediate reply. I knew it. I need to customize this. Is there any possible method?
    – Radhu
    Jan 28, 2020 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.