Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. <?php
  2.  
  3. class Application_Form_Login extends Landing_Form
  4. {
  5. public function init()
  6. {
  7. $this->setName("login");
  8. $this->setMethod('post');
  9.  
  10. $this->addElement('text', 'username', array(
  11. 'filters' => array('StringTrim', 'StringToLower'),
  12. 'validators' => array(
  13. array('StringLength', false, array(0, 50)),
  14. ),
  15. 'required' => true,
  16. 'description'=>'enter your username',
  17. 'label' => 'Username:',
  18. ));
  19.  
  20. $this->addElement('password', 'password', array(
  21. 'filters' => array('StringTrim'),
  22. 'validators' => array(
  23. array('StringLength', false, array(0, 50)),
  24. ),
  25. 'required' => true,
  26. 'label' => 'Password:',
  27. ));
  28.  
  29. $this->addElement('submit', 'login', array(
  30. 'required' => false,
  31. 'ignore' => true,
  32. 'clearDecorators',
  33. 'decorators' => $this->buttonDecorators,
  34. ));
  35.  
  36. }
  37. }
  38.  
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement