© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•17mo ago•
3 replies
M.

How to disabled select in form

i have this code
Select::make('status')
->label('Status')
->required()
->options(collect(InvitationStatus::getValues())
->filter()
->mapWithKeys(fn ($value) => [$value => ucfirst($value)])
->toArray()
)
->default(InvitationStatus::PENDING->value)
->afterStateHydrated(fn ($set, $state) => $state ?: $set(InvitationStatus::PENDING->value)),
but i want to select this disabled,when i try to add '->disabled()' it gets error "General error: 1364 Field 'status' doesn't have a default value" can someone help me
Solution
Using ->dehydrated() at the end ensures the field is included in form submission even when disabled
Jump to solution
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

How do I make select field grey disabled (form in modal)
FilamentFFilament / ❓┊help
3y ago
Form disabled
FilamentFFilament / ❓┊help
3y ago
Failed to disabled select before another select
FilamentFFilament / ❓┊help
2y ago
How to format price in form?
FilamentFFilament / ❓┊help
12mo ago