setMethod('post'); // Add username element $this->addElement('text', 'username', array( 'label' => 'Username:', 'required' => true, 'filters' => array('StringTrim'), 'validators' => array( 'NotEmpty', ) )); // Add password element $this->addElement('password', 'password', array( 'label' => 'Password:', 'required' => true, 'filters' => array('StringTrim'), 'validators' => array( 'NotEmpty', ) )); // Add the submit button $this->addElement('submit', 'submit', array( 'ignore' => true, 'label' => 'Login', )); } }