this my code

my model.

class Mr_Model_Pais extends Zend_Db_Table_Abstract {
    /**
     * The default table name
     */
    protected $_name = 'mr_pais';

    public function obtenerPaises(){

        $db = Zend_Registry :: get('dbRetratos');
        $select = $db->select()
            ->from($this->_name, array('id' => 'id_pais', 'v' =>
'descripcion') );
            $result = $db->fetchAll($select);
            return $result;
    }

}

my form

class CustomForm extends Zend_Form

{

public function init()

{

$this->setMethod(’post’);

$p = new Mr_Model_Pais();

$list = $p->obtenerPaises();

$pais = new Zend_Form_Element_Select('Paises');

$pais ->setLabel(’Countries:’)

->addMultiOptions( $list);

}

}


in the browser display empty  page.



On Fri, Aug 28, 2009 at 12:53 PM, Eugene Morgan <
[email protected]> wrote:

> What kind of error are you getting? I saw the link, but can you
> provide a sample of your code?
>
> On Fri, Aug 28, 2009 at 2:23 PM, Martin Ibarra
> Cervantes<[email protected]> wrote:
> >
> > i need fill a listbox with data of my DB, i try this
> >
> http://zendguru.wordpress.com/2009/03/06/zend-framework-form-working-with-dropdownselect-list/
> >
> > but dont work,  i try on ZF 1.9
> >
> >
>

Reply via email to