kobotoolbox / enketo-express

We've moved! Please use the new repository 🠊 https://github.com/enketo/enketo-express
Apache License 2.0
102 stars 90 forks source link

Describe how to trigger change events #1041

Closed MartijnR closed 6 years ago

MartijnR commented 6 years ago

So Jini script can populate input fields, and trigger fieldsubmissions.

MartijnR commented 6 years ago
var targetInput = //(get your target text input)
var event = new Event('change', {'bubbles': true});
targetInput.dispatchEvent(event);