Atk4 如何使用;setFieldHint";以积垢的形式?

Atk4 如何使用;setFieldHint";以积垢的形式?,atk4,agiletoolkit,Atk4,Agiletoolkit,我想向CRUD表单添加提示,但收到错误 $temp_crud->getElement('pin')->setFieldHint('the hint'); 只需将其添加到您的模型中: $this->addField('my_field')->hint('this hint will show on the form'); 或者你也可以这样做 if($temp_crud->form) { $temp_crud->form->getElement

我想向CRUD表单添加提示,但收到错误

 $temp_crud->getElement('pin')->setFieldHint('the hint');

只需将其添加到您的模型中:

$this->addField('my_field')->hint('this hint will show on the form');
或者你也可以这样做

if($temp_crud->form) {
    $temp_crud->form->getElement('pin')->setFieldHint('the hint');
}

只需将其添加到您的模型中:

$this->addField('my_field')->hint('this hint will show on the form');
或者你也可以这样做

if($temp_crud->form) {
    $temp_crud->form->getElement('pin')->setFieldHint('the hint');
}

它不起作用!应用程序错误:未为此对象异常逻辑定义方法,代码:0其他信息:类:字段方法:提示参数:0:此提示将显示在窗体上,您需要在模型类内执行此操作。另一个注意事项是,您应该执行crud->form->getElement,但您必须注意,crud->form只有在单击编辑按钮时才存在。Roman,我将第一个代码添加到模型中!但是它不起作用,尽管第二个必须起作用……它不起作用!应用程序错误:未为此对象异常逻辑定义方法,代码:0其他信息:类:字段方法:提示参数:0:此提示将显示在窗体上,您需要在模型类内执行此操作。另一个注意事项是,您应该执行crud->form->getElement,但您必须注意,crud->form只有在单击编辑按钮时才存在。Roman,我将第一个代码添加到模型中!但它不起作用,尽管第二个必须起作用。。。