© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
RT2023

sum two fields

I have a case where I need to add two field values from a form. The field values belong to the same table. I am using a placeholder to add the two fields and it works. The filed values are named cash and online. the resulting sum is called sales. The code is shown in the attached image. I want to be able to insert the calculated sales value into the database field. I tried the afterStateUpdated method but cant figure out how to sum the values I want. Thanks for your help
image.png
image.png
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

Summary Sum() of 2 fields
FilamentFFilament / ❓┊help
3y ago
Combine two fields on a form!
FilamentFFilament / ❓┊help
3y ago
Relationship between two dependent select fields
FilamentFFilament / ❓┊help
3y ago
Update parent record with SUM of two related tables
FilamentFFilament / ❓┊help
2y ago