© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
38 replies
peterkeri

Update only one field in a custom action?

Hi guys,

I would like to implement this:
- if the user clicked the edit button, the edit form open
- the form has multiple form components and a key-value component (this value stored in another table with HasOne relation)
- the user made some changes then submit the edit form
- after submit only one field (is_active) has been updated in the edited record, then a new record created with the posted data

I try this:
protected function handleRecordUpdate(Model $record, array $data): Model
{
$record->update(['is_active' => 0]);
return static::getModel()::create($data);
}
protected function handleRecordUpdate(Model $record, array $data): Model
{
$record->update(['is_active' => 0]);
return static::getModel()::create($data);
}

Problem:
All fields of original record has been updated (the related record has been updated too).

How can i solve this? Thanks a lot!
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 live field not updated in a custom action
FilamentFFilament / ❓┊help
13mo ago
Use Action inside a custom field
FilamentFFilament / ❓┊help
2y ago
Custom Action: validateOnly() for field in repeater
FilamentFFilament / ❓┊help
2y ago
ActionGroup Action caching custom view
FilamentFFilament / ❓┊help
9mo ago