© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
12 replies
Trauma Zombie

How to calculate field value based on two other fields?

Hi, I have 3 fields: vehicle price, down payment and loan amount. When I fill vehicle price and down payment, I want to set loan amount value as vehicle price minus down payment.
TextInput::make('vehicle_price')
    ->suffix('€')
    ->reactive(),

TextInput::make('down_payment')
    ->suffix('€')
    ->reactive(),

TextInput::make('loan_amount')
    ->suffix('€'),
TextInput::make('vehicle_price')
    ->suffix('€')
    ->reactive(),

TextInput::make('down_payment')
    ->suffix('€')
    ->reactive(),

TextInput::make('loan_amount')
    ->suffix('€'),
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

Form field value based on 2 other fields
FilamentFFilament / ❓┊help
13mo ago
RichEditor: Dynamic mergeTags based on other fields value
FilamentFFilament / ❓┊help
4mo ago
Change repeater field label based on other field value
FilamentFFilament / ❓┊help
16mo ago
how to display fields of form based on value of another field?
FilamentFFilament / ❓┊help
2y ago