© 2026 Hedgehog Software, LLC

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

Custom Toggle

Is it possible to obtain the current record and the state of the toggle, true or false, in order to perform operations when saving or updating the form, so that based on that record and toggle state, custom operations can be performed, such as creating or editing other different models and the database?
Forms\Components\Toggle::make('custom'),
Forms\Components\Toggle::make('custom'),
Solution
you can work with toggle, but I think you should use some methods to customize data before filling the form and before saving it to the database
Check this section for EditPage: https://filamentphp.com/docs/3.x/panels/resources/editing-records#customizing-data-before-filling-the-form
Editing records - Panel Builder - Filament
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

custom toggle action
FilamentFFilament / ❓┊help
3y ago
Toggle-column
FilamentFFilament / ❓┊help
2y ago
toggle button
FilamentFFilament / ❓┊help
3y ago
afterStateUpdated in toggle in a custom component not firering
FilamentFFilament / ❓┊help
14mo ago