Formio integration in react native application for offline mode.
I'm creating a react native application and wanted to integrate the formio to work in offline mode.
You can find my code at https://github.com/RichaMSaxena/FormIOOffline.
I've implemented the online version of formio within my react native application and within web view, I was successfully able to render the form.
For the offline version, I have downloaded the formio.full.min.js file from https://github.com/formio/formio.js (from the dist folder) and pasted it in the src/assets folder in my react native application and created a webview with custom HTML, but that didn't work.
I also tried to download the formio.full.js from the following link "https://cdn.form.io/formiojs/formio.full.js", but that also didn't help. I got this link from the following page (https://formio.github.io/formio.js/)
On loading my application gives the error "TypeError: undefined is not an object (evaluating 'window.Event.prototype')", with the external formio.full.js link, but works fine when I use the online link i.e. https://cdn.form.io/formiojs/formio.full.js
Can anyone please help me out with the integration of formio in react native application?
Thank you.
Hello @RichaMSaxena,
Have you taken a look at this: https://github.com/formio/react-native-formio?
Hello @wag110894 , Yes, but this library had not been updated for the last 4 years, still, I tried it but it also gives an error at the time of import.
@RichaMSaxena Use Gulp to bundle files into one HTML file(all min js , and html code to run formio) and use that HTML file as a source for the webview it should do the job
I had the same problem, I use ionic with react js and it worked fine for me my app is already in production running 100% offline with no problem
Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!