I’m using the Math.js plugin to take the price of something and calculate a percentage of that value. The calculated value is the price times a percentage. There are times that I’d like to change the percentage to know the calculated value and other times when I want to enter the value and know what percentage that is. I can’t seem to find a way to force the calculation anytime after the page loads.
In the image below I have a property price, and the earnest money is set to 1% of that price. Now, I can either change the Percentage field (which updates the Earnest Money amount) or I can update the Earnest Money amount (which then updates the percentage amount). I can do either one but once I do, I cannot go back and change the other one since changing any value overwrites the the dynamic value coming from the Math.js element.
I’d like to be able to change either one, and each time have the other value update. Can anyone think of a way to do this?
