Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Application_Form_Usuario extends Zend_Form
- {
- public function init()
- {
- $this->setMethod('post');
- // Nome do usuário
- $this->addElement('text', 'user_name', array(
- 'label' => 'Nome Completo:',
- 'required' => true,
- 'filters' => array('StringTrim'),
- 'validators' => array(
- array('validator' => 'StringLength', 'options' => array(0, 100))
- )
- ));
- $this->addElement('text', 'user_email', array(
- 'label' => 'Email:',
- 'required' => true,
- 'filters' => array('StringTrim'),
- 'validators' => array(
- 'EmailAddress',
- array('validator' => 'StringLength', 'options' => array(0, 100))
- )
- ));
- $this->addElement('password', 'user_password', array(
- 'label' => 'Senha:',
- 'required' => true,
- 'filters' => array('Encrypt'),
- 'validators' => array(
- array('validator' => 'StringLength', 'options' => array(0, 100))
- )
- ));
- $this->addElement('submit', 'submit', array(
- 'ignore' => true,
- 'label' => 'Salvar Usuário',
- ));
- $this->addElement('hash', 'csrf', array(
- 'ignore' => true,
- ));
- }
- }
Add Comment
Please, Sign In to add comment