2008年9月23日星期二

[fw-mvc] Label Decoration Options

Hello all,

I am trying to set a prefix for the label decorator, but I think this
method is not implemented yet [setRequiredPrefix() or
[setRequiredSuffix()], and it returns this error
[Zend_Form_Element_Exception: Method setRequiredPrefix does not exist],
I managed to put a prefix by passing an option to the lable array in the
element decorator like this

$form->setElementDecorators ( array (
'ViewHelper',
'Errors',
'Description',
array (array ('data' => 'HtmlTag' ), array ('tag' => 'td',
'class' => 'element' ) ),
array ('Label', array ('tag' => 'td', 'requiredSuffix' =>
'*','requiredPrefix' => ':' ) ),
array (array ('row' => 'HtmlTag' ), array ('tag' => 'tr',
'class' => 'tablemargin' ) ) )
, array ('submit' ), false );

Best regards,

Nayef Abu Ebaid

没有评论: