Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [ZendFramework]Zend_Form i brak formularza
PawelC
post
Post #1





Grupa: Zarejestrowani
Postów: 1 173
Pomógł: 121
Dołączył: 24.09.2007
Skąd: Toruń

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


Witam, mam taki problem, stworzyłem sobie formularz:

  1. <?php
  2. class Form_LoginForm extends Zend_Form
  3. {
  4. public function __contruct($option = null)
  5. {
  6. parent::__contruct($option);
  7.  
  8. $this->setName('login');
  9. $username=new Zend_Form_Element_Text('username');
  10. $username->setLabel('Username:')
  11. ->isRequired();
  12.  
  13. $password=new Zend_Form_Element_Password('password');
  14. $password->setLabel('Password:')
  15. ->isRequired(TRUE);
  16.  
  17. $login=new Zend_Form_Element_Submit('login');
  18. $login->setLabel('Login');
  19.  
  20. $this->addElements(array($username,$password,$login));
  21. $this->setMethod('post');
  22. $this->setAction('/autoryzacja/login');
  23.  
  24. }
  25. }


W kontrolerze wywołuje go tak:

  1. $form = new Form_LoginForm();
  2. $this->view->form=$form;


W widoku mam echo $this->form;

Efekt jest taki, że nie widać formularza w ogóle, a w źródle widoku jest tylko:

  1. <form enctype="application/x-www-form-urlencoded" action="" method="post"><dl class="zend_form">
  2. </dl></form>invalid
Walczę od paru minut i nie mam pojęcia co jest nie tak. To invalid to jest napis podczas podania złych danych w trakcie logowanie.

//Problem rozwiązany, temat do kasacji

Ten post edytował ExPlOiT 30.01.2010, 01:39:38
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 25.12.2025 - 01:36