© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Skent

Get form values in beforeCreate() hook

So I have a resource and in the create the user is presented with two radio options "Property" with option X and Y and "Vehicle" with option X and Y

Before the record is created I want to make sure the user has picked either 1 Property or 1 Vehicle (One in each cannot be selected only one across both radio options)

Is there a way to do this in validation (if its easier)

Otherwise how do I access these values in the beforeCreate() hook as that's how I was going to check but cant figure out to get their values.
Solution
Figured it out using
protected function handleRecordCreation(array $data): Model instead
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

beforecreate() hook returning error
FilamentFFilament / ❓┊help
3y ago
Get current form values
FilamentFFilament / ❓┊help
3y ago
Open a filament modal in beforeCreate() lifecycle hook
FilamentFFilament / ❓┊help
3y ago
How to use action and form in beforecreate() the record
FilamentFFilament / ❓┊help
3y ago