© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
11 replies
vandershraaf

Is it possible to set default selected value?

Is it possible to set default selected option in select field without using db table’s default()? This is basically for adding selected attribute into the <option> html tag. In addition to this, any way to achieve the same for select field with relationship?
Solution
Select::make('select')
    ->options([
        1 => 'Option 1',
        2 => 'Option 2',
    ])
    ->default(1)
Select::make('select')
    ->options([
        1 => 'Option 1',
        2 => 'Option 2',
    ])
    ->default(1)

?
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
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Is it possible to programmatically set table rows as selected
FilamentFFilament / ❓┊help
2y ago
colorpicker default value set
FilamentFFilament / ❓┊help
2y ago
Set default checkboxlist value
FilamentFFilament / ❓┊help
3y ago
set default value for toogle
FilamentFFilament / ❓┊help
10mo ago