Guest User

Untitled

a guest
Dec 11th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. <?php
  2.  
  3. class Application_Form_Usuario extends Zend_Form
  4. {
  5.  
  6. public function init()
  7. {
  8.  
  9. $this->setMethod('post');
  10.  
  11. // Nome do usuário
  12. $this->addElement('text', 'user_name', array(
  13. 'label' => 'Nome Completo:',
  14. 'required' => true,
  15. 'filters' => array('StringTrim'),
  16. 'validators' => array(
  17. array('validator' => 'StringLength', 'options' => array(0, 100))
  18. )
  19. ));
  20.  
  21. $this->addElement('text', 'user_email', array(
  22. 'label' => 'Email:',
  23. 'required' => true,
  24. 'filters' => array('StringTrim'),
  25. 'validators' => array(
  26. 'EmailAddress',
  27. array('validator' => 'StringLength', 'options' => array(0, 100))
  28. )
  29. ));
  30.  
  31. $this->addElement('password', 'user_password', array(
  32. 'label' => 'Senha:',
  33. 'required' => true,
  34. 'filters' => array('Encrypt'),
  35. 'validators' => array(
  36. array('validator' => 'StringLength', 'options' => array(0, 100))
  37. )
  38. ));
  39.  
  40. $this->addElement('submit', 'submit', array(
  41. 'ignore' => true,
  42. 'label' => 'Salvar Usuário',
  43. ));
  44.  
  45. $this->addElement('hash', 'csrf', array(
  46. 'ignore' => true,
  47. ));
  48. }
  49.  
  50. }
Add Comment
Please, Sign In to add comment