Ver Mensaje Individual
  #7 (permalink)  
Antiguo 13/08/2010, 04:29
djbenpm
 
Fecha de Ingreso: agosto-2010
Mensajes: 5
Antigüedad: 13 años, 8 meses
Puntos: 0
Respuesta: Pasar parametros a formulario con ZEND (avanzado)

Solucionado!!!

He puesto esto:

Código PHP:
Ver original
  1. else {
  2.             $id = $this->_getParam('id', 0);
  3.             $data = $this->_getParam('data', 0);
  4.             $titol = $this->_getParam('titol', 0);
  5.             $textcurt = $this->_getParam('textcurt', 0);
  6.             $textllarg= $this->_getParam('textllarg', 0);
  7.  
  8.                if ($id > 0) {
  9.                   $noticia = Application_Model_DbTable_Noticies::getNoticiaById($id);
  10.  
  11.                   $date = array(
  12.                       'id' => $noticia->getId(),
  13.                       'data' => $noticia->getData(),
  14.                       'titol' => $noticia->getTitol(),
  15.                       'textcurt' => $noticia->getTextCurt(),
  16.                       'textllarg' => $noticia->getTextLlarg(),
  17.                   );
  18.                  
  19.                   $form->setDefaults($date);
  20.                   $this->view->form = $form;
  21.                }