I am searching for the way to trigger some JavaScript when input field is populated by code.
my field looks like this:
<input class="form-control" type="string" name="total" id="total" {% if object.total != None %} value="{{ object.total }}"{% endif %} oninput="onChange()" required>
In this case, if I type anything inside this field the method is triggered, but if I populate context object with content, this method is not called. (so the object.total is not empty, and the value is set: value=object.total)
How do I triggered method when value is populated like
value=object.total