Updating numeric form field via "Populate Form Field" node doesn't trigger calculation field update

The “Populate Form Field” expects string as a value but if supplied with something like {{ parseInt(dataFlow["number"]) }} it will work with numeric field. The problem is that after updating the field in this way, the calculation fields based on the numeric one won’t trigger.

Should the numeric field be populated another way? Can I force the recalculation of fields in the form?

1 Like

Hi there :slight_smile:

you can give your number input a class set in the general settings tab:

then connect a JS Event after changing the value:

and in the JS Action add:

let numField = document.querySelector('.my_num')
numField.dispatchEvent(new Event('input', { bubbles: true }));

Might be good for us to do this automatically or add a setting to optionally dispatch an event. I’ll put this down as a feature request for us to check what the best implementation would be :slight_smile: Until then, the workaround above should work. If it doesn’t work on your end, feel free to post a screenshot of your form and nodesetup so I can reproduce it on my end and adjust the workaround.