$collection = Mage::getModel('ourlocation/ourlocation')->getCollection()->getData();
  //print_r($collection);
  //title ourlocation_id
  $options = array();
    $options[] = array(
        'label' => Mage::helper('ourlocation')->__('Please Select Parent Location'),
        'value' => ''
    );
foreach ($collection as $data) {
    $options[] = array(
       'label' => $data['title'],
       'value' => $data['ourlocation_id']
    );
}
$fieldset->addField('parent', 'select', array(
  'label'     => $this->__('Select Parent Location'),
  'name'      => 'parent',
  'values'    => $options,
));

Categories: Magento

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *