This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 18th, 2012  |  syntax: None  |  size: 0.49 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $form = new Application_Form_Comment();
  2.     $form->submit->setLabel('Comment');
  3.     if ($this->getRequest()->isPost()) {
  4.         $formData = $this->getRequest()->getPost();
  5.         if ($form->isValid($formData)) {
  6.         $comment = new Application_Model_DbTable_Comments();
  7.         $comment->addComment($formData['comment'], $id);
  8.             $this->_helper->redirector('index');
  9.         } else {
  10.             $form->populate($formData);
  11.         }
  12.     $this->view->form = $form;
  13.     }
clone this paste RAW Paste Data