Our project evaluates having a custom React-application with only a Form-Engine inside.
How can we add or register a custom save event? Or in other words, we want to have a custom DataProvider which send the form-data to some other backend (non JSON-RPC).
Thanks.
You can change the event id that is send in the form model:
“event”: “submission-event_tukan_commit”
Afterwards, you create your own saga that reacts to that event. We do that by creating a custom middleware and handling filtering for the event id
export const customFormEngineMiddleware: Middleware<{}, object> = api => next => action => {
if (FormEngineActions.event.match(action) && Events.eventButton.match(action.payload.engineEvent)) {
...
check action.payload.engineEvent.payload.name;
We are using the Tutorial provided here: GetA12 Login
In this example only middlewares are registered. How would I register sagas?
We register the customFormEngineMiddle as a middleware with the additionalMiddlewares option and dispatch an action that is later handled in a saga. You can register a saga with the customSagas option.
(All as options to ApplicationFactories.createApplicationSetup)