© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•12mo ago•
21 replies
Zoltar

refreshFormData in afterSave() function

Hello, simply question:

i try to update a form field after saving data, reading a value from database.

in edit page add this function

protected function afterSave(): void
{
$this->refreshFormData([
'calorie_calc',
]);
}

but not work... any idea?
Regards
Solution
Ok.. just use $this->form->fill($this->record->refresh()->toArray())
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

Function in aftersave() is not executed
FilamentFFilament / ❓┊help
3y ago
Using refreshFormData() in static form methods
FilamentFFilament / ❓┊help
2y ago
RelationManager afterSave() Question
FilamentFFilament / ❓┊help
2y ago
Access repeater data afterSave
FilamentFFilament / ❓┊help
2y ago