SocialEngine / Zend中表单的问题

I have created a module in SocialEngine(*which is built on Zend framework v1.9) that contains an admin form with a few options.

The problem I have with it is that it seems to no get the values of the fields from database after I refresh the page and it shows me the default values.

It shows the correct values immediately after I save(*but I am not sure if the page is refreshed after saving), but not after I refresh.

controller /application/modules/Mymodule/controllers/AdminSomesettingsController.php :

class Mymodule_AdminSomesettingsController extends Core_Controller_Action_Admin
{
  public function indexAction()
  {
    $this->view->form = $form = new Mymodule_Form_Admin_Someform();

    $settings = Engine_Api::_()->getApi('settings', 'core');

    if(!$form->isValid($settings->mymodule))
    { return $form->populate($settings->mymodule); }

    if( !$this->getRequest()->isPost() ) { return; }
    if( !$form->isValid($this->getRequest()->getPost()) ) { return; }

    $db = Engine_Api::_()->getDbTable('settings','core')->getAdapter();
    $db->beginTransaction();
    try {
      $values = $form->getValues();
      $settings->mymodule = $values;

      $db->commit();
    } catch( Exception $e ) {
      $db->rollback();
      throw $e;
    }

    $form->saveValues();

    $form->addNotice('Your changes have been saved.');
  }
}

form /application/modules/Mymodule/Form/Admin/Someform.php :

class Mymodule_Form_Admin_Someform extends Engine_Form
{
  public function init()
  {
    $this
      ->setTitle('My Settings')
      ->setDescription('Settings');

    $this->addElement('Radio', 'some_setting', array(
      'label' => 'Some Setting',
      'description' => '',
      'multiOptions' => array(
        0 => 'Option One',
        1 => 'Option Two',
        2 => 'Option Three',
      ),
      'value' => 1,
      'escape' => false,
    ));

    // Add submit button
    $this->addElement('Button', 'submit', array(
      'label' => 'Save Changes',
      'type' => 'submit',
      'ignore' => true
    ));
  }
  public function saveValues()
  {
  }
}

I have checked with other plugins and it seems to me that $form->populate($settings->mymodule); repopulates the form after refresh, but it does not work for me. Any idea how I could make it show the values from the database(*when these values exist) instead of the default values?

I myself am new to socialengine and zend.My understanding of socialengine says, make a function saveValues() inside ur form class, then call it from controller action as $form->saveValues(),passing parameter as needed.This is the convention that socialengine seems to follow, and inside the saveValues() of form class,u can save valus as needed.Ur form shud be populated only if validation fails

(!$form->isValid($formData )) { return $form->populate($formData); }

Instead of default adapter,U should try this-

$db =Engine_Api::_()->getDbTable('settings','core')->getAdapter(),
$db->beginTransaction();

If u want to set the value of a particular field try - $form->populate(array('formField'=>'urValue')); in ur case maybe -

$val=$settings->mymodule,
$form->populate('formField'=>$val); 

You can add the code in controller $form->some_setting->setValue('1');