JavaScript Frameworks
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 Builder can also be embedded using the following code.
Application Embedding
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.
And the following CSS should also be included in your application SASS file.
For more documentation on the JavaScript renderer, please check out the following links.
Angular
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
To use this within your application, you will start by importing the dependencies via NPM.
Once the library is imported into your Angular application, you can render a form using the following code.
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.
Angular Starter Application
Angular Demo Application
Angular Other Resources
React
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 React.
React Renderer
To use this within your application, you will start by importing the dependencies via NPM.
Once the library is imported into your React application, you can render a form using the following code.
Form components provide many helpful properties which allow you to configure your form. Here are the most common of them.
If you need to take more control of the wrapped formio Form instance (e.g., conditionally prepopulate it with some data, or control the behavior of a few components inside the form), you can use formReady prop and save the form instance using React Ref.
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
Vue
The Form.io Vue renderer allows integration with the popular Vue.js framework.
Vue Renderer
To use this within your application, you will start by importing the dependencies via NPM.
Once the library is imported into your Vue application, you can render a form using the following code.
Form components provide many helpful properties which allow you to configure your form. Here are the most common of them.
src
An embed URL to load a form
form
Form JSON schema, can be used instead of the src
{
type: 'form', display: 'form',
components: [...],
}
submission
Submission to set when the form is loaded
{ data: {...}, state: 'submitted', }
options
Form options
{ readOnly: true, noAlerts: false, saveDraft: false, }
There are many other modules and helper components within the Vue library, so we recommend checking out the list of other documentation and examples at the following links.
Vue Starter Application
Aurelia
The Form.io Aurelia renderer allows integration with the Aurelia Framework.
Aurelia Renderer
Aurelia Starter Application
AngularJS
The AngularJS renderer is used to support the original Angular JS framework.
AngularJS Renderer
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.
The following snippet 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.
Installation
There are several ways to add this library to your application. Each of these installation types are for specific use cases.
Full Installation
Includes: Everything including Angular.js and jQuery.
Usage: Use this installation if your application does not already have Angular and jQuery and you wish to display a single form on a page.
Installation: Place the following within your application.
Complete Installation
Includes: Everything except Angular.js and jQuery
Usage: Use this if you are embedding a form within an application that already has Angular.js and jQuery installed.
Installation: Place the following within your application.
Basic Installation: (Bower Installation)
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
Then, you can add the following to your application.
Then run Wiredep to wire it up.
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.
Create an account on https://form.io
Create a new project.
Create a Form within your project. This will then give you an API url like the following.
https://myapp.form.io/myform
.You can then embed this form within your application by providing the following.
<formio src="'https://myapp.form.io/myform'"></formio>
This not only renders the form dynamically within your application, but also automatically hooks up that form to the API backend that is provided by Form.io.
AngularJS Form Builder
AngularJS Helper Libraries
AngularJS Submission Grid
AngularJS Application Starterkit
Angular Material
This library introduces the powerful Form.io JSON forms into the Angular Material framework.
Installation
To install this library into your application, you will need to run the following.
Then, you will need to add the following to your codebase.
Using this library
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.
You can also use this to render JSON forms as follows.
Last updated