Using jquery I\'ve added a change handler to a form. This works when any input is changed BUT only if the user manually changes an input and not when some other code changes
Not in a regular way.
You can change with input and then trigger the change event.
$('#inputId').val('foo').trigger('change');
or with this:
$('#inputId').val('foo').change();