how to use "setFieldHint" in CRUD form?

88 Views Asked by At

I want to add hint to the CRUD form but I receive error.

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

There are 1 best solutions below

4
On

simply add this to your Model:

$this->addField('my_field')->hint('this hint will show on the form');

Alternatively you can do

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