Note
- Version
- 3.x
- Updated
Static explanatory text on the form.
Storage kind: layout · Column: none
Use it for guidance that belongs next to a specific field or introduces a run of them — a tooltip is
attached to one input, a note can introduce a whole section. For a heading with a collapsible body,
use groupstart, which has its own notes / noteHeading settings.
Settings
| Setting | Meaning |
|---|---|
default | The text to display |
label | Optional heading |
default is an odd home for display text, and it is worth knowing why: getDataFromRequest()
copies it onto the data object under the property's name, which is how the template gets at it. The
value never reaches the database — getDataKeysForBaseTable() returns an empty array — but it does
briefly occupy a key on the data object, so do not name a note after a real column.
Notes
Like the group markers, this is form chrome: it contributes no select, no column and no record key,
and appears in no generated artifact. getStorageKind() returns layout, which is what excludes it
everywhere.
Placement is by positionForm like any other property, so a note sits wherever its number puts it.
Give it a position just below the field it explains.
Because the text is a definition value rather than a template, remember to wrap it in KText::_()
so it is translatable like every other label.
@see group.md