In below code detailAction() is called using _forward() from some other
action wiith id parameter set.  delivery info id field is a hidden field. My
prblem is in updateAction the delivery info id field
is null so all succeeding code fails. How to retain its value?

public function detailAction()
{
                $mailDelivery = new MailDelivery();

                $criteria = array();
                        
        $this->getFrontController()->setParam('noViewRenderer', TRUE);
        $view = $this->getView();
        $form = $this->getForm('detail');
        $form->setAction('update');
        $view->form = $form;

        $request = $this->getRequest();
        $criteria['id'] = $request->getParam('id');
        $mailDataArray = $mailDelivery->findDetailMailData($criteria);
        $view->detail = $mailDataArray;
                
        //hidden delivery info id field
        $form->delivery_info_id->setValue($criteria['id'] );
        $res = $this->getResponse();
        $res->appendBody($view->render('maillist/detail.phtml'));               
                        
}

public function updateAction()
{
        if ($_SERVER['REQUEST_METHOD'] != 'POST') {
                return;
        }

        $form = $this->getForm('detail');
        $this->view->form = $form;
        $view->form = $form;
        
        $criteria = array();
        $criteria['id'] = $form->delivery_info_id->getValue();
        $criteria['browse_limit_date'] = $form->browse_limit_date->getValue();
        $mailDelivery = new MailDelivery();
        $rowset = $mailDelivery->find($criteria['id']); 
        $row = $rowset->current();
        $row->browse_limit_date =  $criteria['browse_limit_date'];
        $row->save();   
}

-- 
View this message in context: 
http://www.nabble.com/hidden-form-value-null-problem-tp21155700p21155700.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to