public function setForm(Varien_Data_Form $form) { $allowedGroup = $this->_getAllowedGroup(); if ($allowedGroup) { $fld = $form->getElement('group_id'); $label = ''; $newValues = array(); foreach ($fld->getValues() as $option) { if (in_array($option['value'], $allowedGroup)) { $newValues[$option['value']] = $option['label']; } } $fld->setValues($newValues); } return parent::setForm($form); }