Basic Usage
With Model Binding
Explicit Value
Inline Layout
Display in horizontal layout:Without Label
Multiple Entries
Display multiple boolean fields:Attributes
The field name used to retrieve the boolean value from the bound model
The label text to display
The boolean 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
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)
Value Formatting
The component automatically formats boolean values:true→ Displays the translated “Yes” string (forms::strings.yes)false→ Displays the translated “No” string (forms::strings.no)null→ Displays the translated “blank” string (forms::strings.blank)
Localization
The component uses translation strings from theforms package:
forms::strings.yes- Default: “Yes”forms::strings.no- Default: “No”forms::strings.blank- Default: ”-”
Inheritance
Boolean Entry extends the Text Entry component with:- Automatic boolean-to-text conversion
- Fixed
multiline="false"(cannot be changed) - All other Text Entry features (inline layout, custom classes, etc.)
Rendering
The component renders using the same template as Text Entry:- Definition list (
<dl>) structure <dt>tag for the label<dd>tag for the formatted Yes/No/Blank value- Bootstrap grid classes when using inline layout