© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
24 replies
ciorici

Form field value set but saved as "null" in database

I have a form (order) where I am saving the company_id, from a select with a relationship "->relationship('company', 'name')". For some reason on create the field is saved as null in the database even if it's set as required. I tried to check if the data is passed through in the mutateFormDataBeforeCreate function, everything is fine but it still goes empty in the database. The interesting thing is that it is being saved normally after I edit the record, select it again and then save.
Any ideas what this could be?
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

Beginner form question - Field value is 'null'
FilamentFFilament / ❓┊help
2y ago
Set form field value from outside the form
FilamentFFilament / ❓┊help
3y ago
set value in form field when there is a relationship
FilamentFFilament / ❓┊help
2y ago