First Try on FORM.IO

A combined form and API platform for Serverless applications



  • Node.js 
    installed version: v6.10.3
  • MongoDB
    installed version: MongoDB shell version v3.4.5
  • Web Proxy
    installed: Apache 2.4.x

Demo (R&D)

Max’s Notes

  • Change API URL: formio/client/dist/config.js; i.e. 
    var APP_URL = ‘';
    var API_URL = ‘';
  • First Working Code
<link rel='stylesheet' href=''>
<link rel='stylesheet' href=''>
<script src=''></script>
<script type='text/javascript'>
window.onload = function() {
var form = new FormioForm(document.getElementById('formio'), {
readOnly: false
form.src = '';
form.on('submit', (submission) => {
console.log('The form was just submitted!!!');
form.on('error', (errors) => {
console.log('We have errors!');
<center><div style="width:80%;">
<div id='formio'>form area</div>

Work in progress — Customized Form

Attach to HTML Form

This Formio library can also be used to attach an existing HTML Form to the API service using the Formio.form method. Let's suppose you have the following HTML form.

<form action='' id="myform">
<label>First Name
<input id="first-name" name="data[user][firstName]" type="text" placeholder="First name only" required="" autofocus="">
<label>Last Name
<input id="last-name" name="data[user][lastName]" type="text" placeholder="Last name only" required="" autofocus="">
<input id="email" name="data[user][email]" type="email" placeholder="" required="">

You can now attach this form to the API by calling the following.

var form = document.querySelector('form#myform');
Formio.form(form, function(err, submission) {

This will now let the user fill out the form, and then when they press the submit button, will execute the API call into

This also works with jQuery like so…

Formio.form($('form#myform'), function(err, submission) {