27 Jun 2010 07:03
ezcInputFormDefinitionElement problem
Hi there!
I'm looking for a hint on the following problem using the components,
any help appreciated.
One of my templates provides a form with an input field called "password":
<form action="/authenticate" method="post">
<fieldset>
<input name="password" id="password" class="textinput" type="password" />
<button type="submit">Login</button>
</fieldset>
</form>
Any submit will call the action slot "authenticate" that will validate
the form data according to my form definition:
private static function getFormDefinition() {
$definition = array(
'password' => new ezcInputFormDefinitionElement(
ezcInputFormDefinitionElement::REQUIRED,
'callback',
array('appFormTools', 'checkEmpty')
)
);
return $definition;
}
Here's the callback function for the password:
(Continue reading)
RSS Feed