A list of all the Progressive Web Application frameworks supported by the Form.io platform.
JavaScript
At its core, the Form.io platform uses a plain JavaScript (aka Vanilla JavaScript) renderer to render the forms within an application. This renderer, as well as all documentation can be found on Github @ https://github.com/formio/formio.js. For the full documentation, please take a look at Form Renderer Documentation in the help guides.
This renderer is able to easily render a form using the following code within your application either via Script embedding or application embedding.
Script Embedding
This allows the embedding of a form directly within an HTML application using the script tags within the header. The scripts and CSS that need to be included are as follows.
The form renderer can also be embedded within an application by first including the formiojs renderer as an NPM dependency and then using the following code.
The Angular framework is a very popular PWA framework offered by Google. The Form.io integration libraries provide a simple wrapper around the JavaScript renderer library, but expose a number of helper components and modules that enable rapid application development within the Angular framework.
Angular Renderer
GitHub - formio/angular: JSON powered forms for Angular
GitHub
To use this within your application, you will start by importing the dependencies via NPM.
1
npm install --save formiojs @formio/angular
Copied!
Once the library is imported into your Angular application, you can render a form using the following code.
1
import{ FormioModule }from'@formio/angular';
2
@NgModule({
3
imports:[
4
...,
5
FormioModule
6
],
7
...
8
})
9
exportclassAppModule{}
Copied!
And then the following can be used within your templates to render a form.
There are many other modules and helper components within the Angular library, so we recommend checking out the list of other documentation and examples at the following links.
The React is a popular JavaScript library for building PWA applications. It is maintained by Facebook. The Form.io integration libraries provide a simple wrapper around the JavaScript renderer library, but expose a number of helper components and modules that enable rapid application development within the React.
React Renderer
GitHub - formio/react: JSON powered forms for React.js
GitHub
To use this within your application, you will start by importing the dependencies via NPM.
1
npm install --save formiojs @formio/react
Copied!
Once the library is imported into your React application, you can render a form using the following code.
1
import React from'react';
2
import{ Form }from'@formio/react';
3
​
4
constApp=()=>(
5
<div className="container" id="main">
6
<Form src="https://examples.form.io/example"/>
7
</div>
8
);
Copied!
Form components provides a lot of helpful properties which allow you to configure your form. Here are the most common of them.
A hook which will be called once the form instance is created and ready for use. Use this to take more control over the form.
(formInstance) => {
formRef.current = formInstance;
}
formioform
You can pass a custom Form class using this prop
​
on${formioEventKey}
Use this template to subscribe to any event exposed by formio.
​
If you need to take more control of the the wrapped formio Form instance (e.g, conditionally prepopulate it with some data, or control the behavior of few components inside the form), you can use formReady prop and save form instance using React Ref.
1
import React from'react';
2
import{ Form }from'@formio/react';
3
​
4
constApp=()=>{
5
const formRef = React.useRef(null);
6
const onFormReady = React.useCallback((form)=>{
7
formRef.current = form;
8
},[]);
9
​
10
return(
11
<div className="container" id="main">
12
<Form src="https://examples.form.io/example"/>
13
</div>
14
);
15
};
Copied!
There are many other modules and helper components within the React library, so we recommend checking out the list of other documentation and examples at the following links.
React Starter Application
GitHub - formio/react-app-starterkit: A react starterkit for creating new web applications with Form.io
GitHub
Vue
The Form.io Vue renderer allows integration with the popular Vue.js framework.
Vue Renderer
GitHub - formio/vue-formio: Javascript Powered forms and JSON form builder for Vue.js
GitHub
Vue Starter Application
GitHub - formio/vue-app-starterkit: Starterkit for building apps with form.io and vue
GitHub
Aurelia
The Form.io Aurelia renderer allows integration with the Aurelia Framework.​
Aurelia Renderer
GitHub - formio/aurelia-formio: Form.io JSON Forms and Form Builder for Aurelia
This library is meant to be used in conjunction with Form.io to provide dynamic JSON form rendering capabilities. This allows you to render any form using the schemas provided by Form.io.
GitHub - formio/ngFormio: JSON powered form rendering library for AngularJS + Form.io.
GitHub
The following snippit of code will dynamically render the form within Form.io, as well as automatically hook that form up to the REST API generated from the same schema.
Includes: Only the ngFormio renderer library with no dependencies.
Usage: When you wish to explicitely include all of the dependencies like when you are using Wiredep.
Installation: We recommend using Wiredep for the Basic installation since it will wire up all the dependencies for you. You just need to place the following within your application.
First install the dependency using Bower
1
bower install --save ng-formio
Copied!
Then, you can add the following to your application.
1
<html>
2
<head>
3
<!-- bower:css -->
4
<!-- endbower -->
5
</head>
6
<body>
7
<!-- bower:js -->
8
<!-- endbower -->
9
</body>
10
</html>
Copied!
Then run Wiredep to wire it up.
1
$ node
2
> require('wiredep')({ src: 'index.html' });
Copied!
We also recommend using this within a Gulp build process using Wiredep in combination with Gulp UseRef.
Usage
Now that you have the library installed, you can then do the following to add a form to your application.
This not only renders the form dyanmically within your application, but also automatically hooks up that form to the API backend that is provided from Form.io.
AngularJS Form Builder
GitHub - formio/ngFormBuilder: The Form.IO Form Builder Application
GitHub
AngularJS Helper Libraries
GitHub - formio/ngFormioHelper: A library to help build Angluar.js applications on top of Form.io.
GitHub
AngularJS Submission Grid
GitHub - formio/ngFormioGrid: Provides a way to display Form.io submission data within the Angular UI-Grid.
GitHub
AngularJS Application Starterkit
GitHub - formio/ng-app-starterkit: An angular 1.x starterkit for creating new web applications with Form.io
This library can be used to render dynamic JSON powered forms within any Angular Material application. This uses the exact same syntax as the <formio> component within the Angular Form.io Library. The only difference is that you will use the <mat-formio> directive instead.
For example, the following will render a dynamic JSON form within your application.