You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When integrating Enketo Forms with frontend applications made on React, Angular, plain html css etc it becomes for these apps to interact with the form directly.
Describe the solution you'd like
Events should be provided by default like onFormChange, onSubmit, onSubmitSuccessful, onFailure, onFileUpload, etc which would allow the frontend application to interact with the enketo form.
Describe alternatives you've considered
We've added events manually in controller-webform.js to suit our needs. For example, an event listener was added to events.XFormsValueChanged to listen to form changes event and then data was broadcasted to the frontend application.
document.addEventListener(events.XFormsValueChanged().type, async (e) => {
/*
* Perform actions on event change
* /
// Broadcast back to frontend
await formController.broadcastFormDataUpdate(form.getDataStr(), {});
}
Note : This feat/issue is linked to previous issues(s) #940, #939
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When integrating Enketo Forms with frontend applications made on React, Angular, plain html css etc it becomes for these apps to interact with the form directly.
Describe the solution you'd like
Events should be provided by default like
onFormChange, onSubmit, onSubmitSuccessful, onFailure, onFileUpload,
etc which would allow the frontend application to interact with the enketo form.Describe alternatives you've considered
We've added events manually in
controller-webform.js
to suit our needs. For example, an event listener was added toevents.XFormsValueChanged
to listen to form changes event and then data wasbroadcasted
to the frontend application.Note : This feat/issue is linked to previous issues(s) #940, #939
The text was updated successfully, but these errors were encountered: