Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 495 Bytes

hint.md

File metadata and controls

33 lines (24 loc) · 495 Bytes

Hint Field Part

Represents hint for a form field. If hint is empty, field part will be hidden.

Usage Example

Form model:

final class CreateForm extends FormModel
{
    public ?string $name = null;

    public function getAttributeHints(): array
    {
        return [
            'name' => 'Input your full name.',
        ];
    }
}

Widget:

echo Hint::widget()->formAttribute($createForm, 'name');

Result will be:

<div>Input your full name.</div>