pues la verdad no se donde pueda estar el problema: este es un completo de mi código LoginForm.php
Código PHP:
Ver originalclass Application_Form_LoginForm extends Zend_Form {
public function init() {
$this->setMethod(Zend_Form::METHOD_POST);
$username = $this->addElement ( 'text', 'username', array ( 'filters' => array ( 'StringTrim', 'StringToLower' ), 'validators' => array ( 'Alpha', array ( 'StringLength',false, array ( 3,20 ) ) ), 'required' => true,
'label' => 'Usuario:'
) );
$password = $this->addElement ( 'password', 'password', array ( 'filters' => array ('StringTrim'), 'validators' => array ('Alnum', array ( 'StringLength', false, array ( 6, 20 ) ) ), 'required' => true,
'label' => 'Contraseña:'
) );
$login = $this->addElement ( 'submit', 'login', array ( 'required' => false,
'ignore' => true,
'label' => 'Ingresar'
) );
$login = $this->addElement ( 'submit', 'login', array ( 'required' => false,
'ignore' => true,
'label' => 'Ingresar'
) );
$this->setElementDecorators(array('ViewHelper'));
$this->setDecorators(array( array ('ViewScript', array('viewScript' => 'login/_login.phtml' )), array ('HtmlTag', array ('tag' => 'dl','id' => 'login' ) ), array ('Description', array ('placement' => 'prepend') ), 'Form'
));
}
}
y este es el phtml _login.phtml
Código HTML:
Ver original<h1>Restrici
ón
</h1>
<?php echo $this->element->getElement('username'); ?>
<?php echo $this->element->password; ?>
<?php echo $this->element->getElement('login'); ?>
<a href="">Reg
ístrate
</a>