If you are using JavaScript to populate a hidden field which you then use in another field's calculation, you may find that the latter does not update its value as displays the previous value of the hidden field. This is caused due the calculations not running after you update the hidden field. You will need to trigger the calculations right after you change the value of the hidden field. Below you can find how to trigger the calculations to re-run when you update a field: var el = document.querySelector("#input"); el.value = 70; el.dispatchEvent(new Event('input', { 'bubbles': true })); You can also trigger the calculations on the form itself: var el = document.querySelector("#input"); el.value = 70; el.closest("form").dispatchEvent(new Event('input'));