Calculation in Dynamic Attributes

in an insertion form I have a input with a dynamic attribute that calculates a value from two inputs.

example:
input_price * input_quantity = input_total(dynamic attributes)
2.0 x 1.5 = 3.0

until then, everything is normal,

I have another edit form that receives the data, in the edit form where I do the same calculation if I want to change the price and quantity inputs ?