Created
February 1, 2010 13:52
-
-
Save kirkegaard/291699 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Planner_Form_Login extends Zend_Form { | |
public function init() { | |
$this->setAction('/auth/process/'); | |
$this->setElementFilters(array('StringTrim', 'StripTags')); | |
$this->addElement('text', 'username', array( | |
'label' => 'Username:', | |
'attribs' => array( | |
'maxlength' => 100, | |
'size' => 60 | |
), | |
'validators' => array( | |
array('StringLength', false, array(3,25)) | |
), | |
'required' => true | |
)); | |
$this->addElement('password', 'password', array( | |
'label' => 'Password:', | |
'attribs' => array( | |
'maxlength' => 100, | |
'size' => 60 | |
), | |
'validators' => array( | |
array('StringLength', false, array(6,100)), | |
), | |
'required' => true | |
)); | |
$this->addElement('submit', 'submit', array( | |
'label' => 'Login' | |
)); | |
$this->addDisplayGroup( | |
array('username','password', 'submit'), | |
'userlogin', | |
array( | |
'legend' => 'User Login' | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment