Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony] problem z sfForm bind
Mgorka
post
Post #1





Grupa: Zarejestrowani
Postów: 209
Pomógł: 3
Dołączył: 6.04.2010
Skąd: Słupca

Ostrzeżenie: (0%)
-----


Witajcie uczę się tworzenia formularzy w symfony 1.4 według poradnika ze strony symfony i mam problem z funkcją bind otrzymuję error Call to a member function bind() on a non-object in
Co go może wywoływać
  1. class kontaktActions extends sfActions
  2. {
  3. /**
  4.   * Executes index action
  5.   *
  6.   * @param sfRequest $request A request object
  7.   */
  8. public function executeIndex(sfWebRequest $request)
  9. {
  10. $this->form = new KontaktForm();
  11. }
  12. public function executeSend(sfWebRequest $request)
  13. {
  14. if ($request->isMethod('post'))
  15. {
  16. $this->form->bind($request->getParameter('kontakt'));
  17. if ($this->form->isValid())
  18. {
  19. $this->redirect('kontakt/index?'.http_build_query($this->form->getValues()));
  20. }
  21. }
  22.  
  23. }
  24.  
  25. }
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 02:18