© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
10 replies
josef

Default value for select

I want to have the default value for a select not only pre-selected in the frontend, but also when saving. Currently, the validation throws an error that a value has to be chosen, even though the select (with placeholder disabled) shows the value that should be default.
An example:
Forms\Components\Select::make('curency')
    ->required()
    ->options([
        'EUR' => '€',
        'USD' => '$',
    ])
    ->default('EUR')
    ->disablePlaceholderSelection(),
Forms\Components\Select::make('curency')
    ->required()
    ->options([
        'EUR' => '€',
        'USD' => '$',
    ])
    ->default('EUR')
    ->disablePlaceholderSelection(),
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

set default value for select
FilamentFFilament / ❓┊help
3y ago
Select field default value
FilamentFFilament / ❓┊help
3y ago
Default Selection for Select Field
FilamentFFilament / ❓┊help
3y ago
Select default value from select dropdown
FilamentFFilament / ❓┊help
17mo ago