0

我正在尝试向我的表单和数据库添加一些额外的字段。我收到以下错误。

致命错误:在“Form.Class.php”中的非对象上调用成员函数 setLabel()

对同一字段使用 SetAttribute 时也会出现Setattribute错误。

代码:

$this->widgetSchema['purchased_hours']->setLabel('Purchased hours');
$this->widgetSchema['purchased_hours']->setAttribute('size', 50);

你能告诉我为什么吗?

4

0 回答 0