I just found myself in a situation where I need to update the value of a variable from JS.
But, after reading this and few other posts, I understand that variables should not be changed using dmx.app.data…, instead, use this hidden field method.
dmx-on:change/blur event of hidden field is unable to read its value.
I have tried reading as
hiddenfield.value and just
value, but everything just returns either empty or undefined.
Also, I found that
trigger triggers the change/blur event before the value actually appears on the hidden input. So I used a
setTimeout to call
trigger, and now value is being set correctly, before dmx event fires, but dmx is still unable to read the value of the field.
Please help @patrick / @yarycling / @mrbdrm