2009年6月29日星期一

[fw-mvc] Form Decorator Method getLabel does not exist

Hi.
Can you explain me why on earth this code get
the error in the subject:
class Form_User extends Zend_Form
{
public function init()
{
$this->setMethod('post');
$this->setAttribs(array('id'=>'frm-user','class'=>'large center'));
// Name
$this->addElement('text', 'uname', array(
'maxlength' => 50,
'label' => 'form_User_Label_Name',
'required' => true,
'filters' => array('StringTrim'),
'validators' => array(
'Alnum',
array('StringLength', true, array(3, 50)),
array('Db_NoRecordExists', false, array('table' => 'users',
'field' =>
'uname'))
)
));

$this->setDisableLoadDefaultDecorators(true);
$this->setDecorators(array(
'formElements',
array('HtmlTag', array('tag' => 'dl', 'class' =>
'elements-frm-user')),
array('Label', array('tag' => 'dd', 'class' =>
'labels-frm-user')),
'Form'
));

}
}

Bye.
--
View this message in context: http://www.nabble.com/Form-Decorator-Method-getLabel-does-not-exist-tp24249990p24249990.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: