© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
darrena092

How to properly use a boolean Select field.

Hi there,

Having some trouble working out how boolean select fields are meant to work. If I call
Select::make('my_field')->boolean('Yes', 'No', 'Select an option')
Select::make('my_field')->boolean('Yes', 'No', 'Select an option')
, then it doesn't actually work if I pre-fill that field with an actual
boolean
boolean
. I suspect this is because the options are set to
0
0
and
1
1
by this and
true !== 1
true !== 1
.

How is this intended to be used? Should the field actually be treated as a number and cast to a boolean after the fact?
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Using "Select" form component with field cast to boolean
FilamentFFilament / ❓┊help
3y ago
How to validate Select relation field?
FilamentFFilament / ❓┊help
16mo ago
Pass 'Select' field values to other fields.
FilamentFFilament / ❓┊help
3y ago
select field
FilamentFFilament / ❓┊help
3y ago