Transform data
The two properties of transformDataResponse and transformDataSubmit support writing JS code for data conversion, but this JS code works in a web worker and can only accept data and return converted data. It cannot operate the page DOM and cannot access formApi. The example is as follows:
/* uncomment to load 3rd party libs
var libsToLoad = [
!globalThis.dayjs && PUBLIC_PATH + 'lib/dayjs.min.js',
!globalThis._ && PUBLIC_PATH + 'lib/lodash.min.js',
].filter(Boolean);
importScripts.apply(undefined, libsToLoad);
*/
(function transform(data) {
/*
you can access the following parameters if applicable.
`context`: current form context
`formData`: current form data
*/
return data;
})(this);