Hello,
I am new in ZF and have some question :
I have a form :
Code:
public static function Login()
{
require_once 'Zend/Form.php';
$LoginForm = new Zend_Form(
array(
'method' => 'post',
'elements' => array(
'LoginName' => array('text', array(
'required' => true,
'label' => 'Prisijungimo vardas'
)),
'Pass' => array('text', array(
'required' => true,
'label' => 'Slaptažodis'
)),
'submit' => array('submit', array(
'label' => 'Prisijungti'
))
),
));
return $LoginForm;
}
and view
Code:
$form=$this->Login();
if ($this->getRequest()->isPost())
{
if ($form->isValid($_POST))
{
$values = $form->getValues();
}
/*else
{
$form->populate($_POST);
}*/
}
$this->view->form = $form;
Now if textfield are empty write default message.
How can I change this message, without creating a new class who extends Zend_Validate_Abstract?