Hi,
I work with forms and with validators.
For multilinguality I set options(an array with all word in the right language) to the forms initialize function. For Text-fields 'placeholder' are able to handle a field of the options-array, but the Validator 'message' isn't able.....
public function fooAction()
{
$t = $this->_getTranslation();
$form = new FooForm(new Users(), $t["FooForm"]);
$this->view->form = $form;
}
class FooForm extends Form
{
public function initialize($objekt, $opt)
{
// ID
$id = new Text('id', array(
'placeholder' => $opt['ID'] //here the string is displayed
));
$id->addValidators(array(
new PresenceOf(array(
'message' => $opt['id-pres'] //here the default message is showed not my $opt[]
))
));
}
}
Could anybody help me please!
Thanks buchi