Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.