Form with setLayout and displayFieldError not working, workaround?

58 Views Asked by At

i have a code like this:

$f = $this->add('Form', null, null, array('form/stacked'));         
$f->setModel('Application',false);
$f->setLayout('form/create_brand_2');
$f_fbid = $f->addField('Line','app_id','')->validateNotNull();

if($f->isSubmitted()){
  return $f_fbid->displayFieldError('Error text');
}

But i get no error text, neither on validateNotNull. It is working without setting layout. Is this a bug or it just the way it is, what would be the best workouround?

0

There are 0 best solutions below