I have four form fields that should be autocompleted based on the input of the user, in the following way: when the first field is filled in, the second field should be filled with the first one's value * 2. When the 3rd field is filled, the fourth one should be filled with this third value * the first one.

I have no problems with the first two fields, but the third and fourth one keep returning 0 as a result.

Go to the bottom of the page, there is only one row, click on Edit. Now if I insert, let's say, 2 into Coppie, Persone becomes 4, but if I write 20.00 into Contributo a coppia, Contributo serata remains 0 (it should be 20.00 * 2).

Could the reason be due to the keyup code for that second field being commented out?

Sorry, I forgot to update the code in the online version. The content of calcoloautomatico.js is the one I've posted in my first post in this topic. Even if nothing is commented out, I get the same problem.

Go to the bottom of the page, there is only one row, click on Edit. Now if I insert, let's say, 2 into Coppie, Persone becomes 4, but if I write 20.00 into Contributo a coppia, Contributo serata remains 0 (it should be 20.00 * 2).