© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
moaaz_m_f

Required "Select" forms component saving empty data.

- Create a select form component and make it required
- Open the page and fill the rest of the form but keep the select empty (placeholder)
- Save the form = it will give error to choose from the select
- Now select any option and save again
= the chosen option will not be saved
- try to open the page again to update = you will see that the select has nothing chosen.

Note: if I will open the form and and choose select option before trying to save in the first place = data will be saved without any issues.

is this a bug, or am I doing something wrong

Forms\Components\Select::make('menu_section_id')
                        ->relationship('menuSection', 'description')
                        ->options($sectionOptions)
                        ->default($defaultSection)
                        ->required(),
Forms\Components\Select::make('menu_section_id')
                        ->relationship('menuSection', 'description')
                        ->options($sectionOptions)
                        ->default($defaultSection)
                        ->required(),
image.png
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

Saving forms data to resource
FilamentFFilament / ❓┊help
3y ago
Dynamic select not saving data
FilamentFFilament / ❓┊help
3y ago
\Forms\Components\Select
FilamentFFilament / ❓┊help
5mo ago
Select Column Saving
FilamentFFilament / ❓┊help
15mo ago