© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
Tuathanach

form input default value not passed

Here is my code
Select::make('site')
->relationship(name: 'site', titleAttribute: 'name')
->default(Auth::user()->person->site_id)
->createOptionForm([
Forms\Components\TextInput::make('name')
->required(),
]),
Select displays correctly as expected but when press create get error as no data passed from this select. By default I want the select to be the logged in users site. Which it does display but goes blank when press create
Solution
Don't use
relationship()
relationship()
if you dont' want to save it to a relationship
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

custom form default value not working
FilamentFFilament / ❓┊help
3y ago
Default value in Select input
FilamentFFilament / ❓┊help
2y ago
default value on form select not populating
FilamentFFilament / ❓┊help
3y ago