Basic Usage
Binding to Models
Inline Layout
Display entries in a horizontal layout with configurable column classes:config/forms.php:
inline-entry-label-class: Defaultcol-sm-6 col-md-4inline-entry-class: Defaultcol-sm-6 col-md-8
Custom Inline Classes
Multiline Text
Display text with line breaks preserved:WYSIWYG Content
Render HTML content without escaping:Array Values
Arrays are automatically displayed as unordered lists:Enum Values
Enums withgetColor() methods are automatically rendered as status badges:
Model Links
Models withadmin_link attributes are automatically linked:
Custom Content
Override the default value rendering with slot content:Attributes
The field name used to retrieve the value from the bound model
The label text to display
The value to display. If not provided, the value is retrieved from the model using the name attribute
The model instance to retrieve the value from
Whether to display the label
Display the entry in horizontal layout with label and value side-by-side
Preserve line breaks in the displayed value (converts newlines to
<br> tags)Render the value as raw HTML without escaping (use with trusted content only)
Custom CSS classes for the label column when using inline layout
Custom CSS classes for the value column when using inline layout
Override the default CSS framework (bootstrap-5, material-admin-26)
Display Logic
The component automatically handles different value types:- Slot content: If provided, displays the slot content
- Admin models: Models with
admin_linkattribute display as clickable links - Admin model collections: Collections of admin models display as comma-separated links
- Status enums: Enums with
getColor()method display as status badges - Multiline text: Text with
multiline="true"preserves line breaks - Arrays: Display as unordered lists
- WYSIWYG content: HTML content with
wysiwyg="true"is rendered unescaped - Empty values: Display the translated “blank” string for empty values (except numeric zero)
Rendering
The component renders as a definition list (<dl>) with:
<dt>tag for the label (ifshow-labelis true)<dd>tag for the value- Bootstrap grid classes applied when
inline="true"