Get the sum of 2 values.
Please help me regarding adding of 2 inputtext value. Thank you for response.
8 Replies
Do you have two inputs and want to show the sum in another input?
yes,
If u share ur form schema here, then it will be easy to give a quick solution.
take a look
I want to multiply the price by its quantity
Thank you for the response
->content(fn ($get) => $get('input_a') + $get('input_b'))
to
->content(fn ($get) => (int)$get('item_quantity') * (float)$get('item_price'))
In addition, check this section. You can use injected arguments to do what you want
https://filamentphp.com/docs/2.x/forms/advanced#using-closure-customization