You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ned Zimmerman edited this page Apr 23, 2026
·
3 revisions
The Checkboxes component is used to create a group of related checkbox inputs with an optional hint and validation status reflected using aria-invalid. It must be used in a fieldset in combination with related Hint and Error components.
Example Usage
The following example shows a group of checkboxes which indicates a user's preferred communication method and which has a hint as well as validation error support with a named message bag.
<fieldsetclass="field @error('communication_methods', 'updateProfileInformation') field--error @enderror">
<legend>{{__('Preferred communication methods') }}</legend>
<x-hearth-checkboxesname="communication_methods":options="[['value' => 'email', 'label' => __('Email')], ['value' => 'phone', 'label' => __('Phone')]]":checked="old('communication_methods', $user->communication_methods) ?? []"hintedbag="updateProfileInformation" />
<x-hearth-hintfor="communication_methods">{{__('If we need to contact you, we will use the methods you indicate here.') }}</x-hearth-hint>
<x-hearth-errorfor="communication_methods"bag="updateProfileInformation" />
</fieldset>