protected function _initFormValues()
 {
     $data = $this->getFilterData()->getData();
     foreach ($data as $key => $value) {
         if (is_array($value) && isset($value[0])) {
             $data[$key] = explode(',', $value[0]);
         }
     }
     $this->getForm()->addValues($data);
     return parent::_initFormValues();
 }
Exemple #2
0
 /**
  * Initialize form fileds values
  * Method will be called after prepareForm and can be used for field values initialization
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _initFormValues()
 {
     $data = $this->getFilterData()->getData();
     foreach ($data as $key => $value) {
         if (is_array($value) && isset($value[0])) {
             $data[$key] = explode(',', $value[0]);
         }
         if ($key == 'product_category' and !empty($value)) {
             $ctoptions = Mage::helper('productreports')->getProductCategories($value);
             $this->setFieldOption('product_sub_category', $ctoptions);
         }
     }
     $this->getForm()->addValues($data);
     return parent::_initFormValues();
 }
Exemple #3
0
 /**
  * Initialize form fileds values
  *
  * @return Mage_Eav_Block_Adminhtml_Attribute_Edit_Main_Abstract
  */
 protected function _initFormValues()
 {
     Mage::dispatchEvent('adminhtml_block_eav_attribute_edit_form_init', array('form' => $this->getForm()));
     $this->getForm()->addValues($this->getAttributeObject()->getData());
     return parent::_initFormValues();
 }
 /**
  * Initialize form fileds values
  *
  * @return Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Tab_Main
  */
 protected function _initFormValues()
 {
     $this->getForm()->addValues($this->getWidgetInstance()->getData());
     return parent::_initFormValues();
 }
Exemple #5
0
 /**
  * Initialize form fileds values
  * Method will be called after prepareForm and can be used for field values initialization
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _initFormValues()
 {
     $this->getForm()->addValues($this->getFilterData()->getData());
     return parent::_initFormValues();
 }
Exemple #6
0
 protected function _initFormValues()
 {
     $this->getForm()->setValues($this->getForm()->getModel()->getData());
     return parent::_initFormValues();
 }