All Projects → formio → Formio.js

formio / Formio.js

Licence: mit
JavaScript powered Forms with JSON Form Builder

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Formio.js

Formio
A Form and Data Management Platform for Progressive Web Applications.
Stars: ✭ 1,245 (+17.45%)
Mutual labels:  forms, vanilla-js, vanillajs
Vanillajs Deck
A Vanilla.js Single Page App (SPA) slide deck for a presentation about Vanilla.js written with no frameworks.
Stars: ✭ 119 (-88.77%)
Mutual labels:  vanilla-js, vanillajs
Basictable
Basic Table jQuery or Vanilla JS plugin for simple responsive tables.
Stars: ✭ 94 (-91.13%)
Mutual labels:  vanilla-js, vanillajs
Validate
A lightweight form validation script.
Stars: ✭ 227 (-78.58%)
Mutual labels:  forms, vanilla-js
Learn Vanilla Js
Open source list of paid & free resources to learn vanilla JavaScript
Stars: ✭ 945 (-10.85%)
Mutual labels:  vanilla-js, vanillajs
Vanilla Ui Router
Simple vanilla JavaScript router
Stars: ✭ 42 (-96.04%)
Mutual labels:  vanilla-js, vanillajs
Bs Custom File Input
A little plugin for Bootstrap 4 custom file input
Stars: ✭ 162 (-84.72%)
Mutual labels:  vanilla-js, vanillajs
form-saver
A simple script that lets users save and reuse form data.
Stars: ✭ 67 (-93.68%)
Mutual labels:  forms, vanilla-js
add-to-calendar-button
A convenient JavaScript snippet, which lets you create beautiful buttons, where people can add events to their calendars.
Stars: ✭ 697 (-34.25%)
Mutual labels:  vanilla-js, vanillajs
tensorflowjs-remove-background
Remove Background from the picture using WebAssembly & TensorFlow.js
Stars: ✭ 79 (-92.55%)
Mutual labels:  vanilla-js, vanillajs
vanillajs-hello
Start a VanillaJS website using WebPack in just 30 seconds: HTML,CSS,Babel,SASS,Bootstrap,Prettier,Gitpod
Stars: ✭ 24 (-97.74%)
Mutual labels:  vanilla-js, vanillajs
bs-breakpoints
A plugin which detect Bootstrap 4 breakpoints and emit when there is a change
Stars: ✭ 22 (-97.92%)
Mutual labels:  vanilla-js, vanillajs
Bs Stepper
A stepper for Bootstrap 4.x
Stars: ✭ 261 (-75.38%)
Mutual labels:  vanilla-js, vanillajs
Regie
An observable state management tool for vanilla JS applications based on Proxies
Stars: ✭ 33 (-96.89%)
Mutual labels:  vanilla-js
Navscroll Js
Lightweight package for highlighting menu items as you scroll the page, also scrolling to target section when item clicked. Use as a vue component/directive or in vanilla js.
Stars: ✭ 41 (-96.13%)
Mutual labels:  vanilla-js
React Forms
Form Rendering Library written in React
Stars: ✭ 29 (-97.26%)
Mutual labels:  forms
Dom Slider
Plain JavaScript version of jQuery's slideToggle(), slideDown(), & slideUp(), but does not use display: none.
Stars: ✭ 44 (-95.85%)
Mutual labels:  vanilla-js
Usetheform
React library for composing declarative forms, manage their state, handling their validation and much more.
Stars: ✭ 40 (-96.23%)
Mutual labels:  forms
Formidable
PHP 7 form library for handling user input
Stars: ✭ 27 (-97.45%)
Mutual labels:  forms
Vanilla Emoji Picker
Modern emoji picker. Super light 2kb gzipped, simple and no frameworks 😻
Stars: ✭ 20 (-98.11%)
Mutual labels:  vanilla-js

JavaScript powered forms and SDK for Form.io

This library is a plain JavaScript form renderer and SDK for Form.io. This allows you to render the JSON schema forms produced by Form.io and render those within your application using plain JavaScript, as well as provides an interface SDK to communicate to the Form.io API's. The benefits of this library include.

  • Plain JavaScript implementation using ES6 and Modern practices (no jQuery, Angular, React, or any other framework dependency)
  • Renders a JSON schema as a webform and hooks up that form to the Form.io API's
  • Complete Form Builder which creates the JSON schema used to render the forms.
  • Nested components, layouts, Date/Time, Select, Input Masks, and many more included features
  • Full JavaScript API SDK library on top of Form.io

Form.io is Hiring!

If you like what you see, and would like to come and work for a cutting edge, Open Source core company, then please apply online @ https://form-talent.freshteam.com/jobs!

Examples and Demonstration

To find out more about this library as well as see a demonstration of what you can do with this library, go to the Examples and Demo site @ https://formio.github.io/formio.js

Installation

To install this SDK into your project, you can use the following command within your terminal.

npm install --save formiojs

Form Building

This library has a very powerful JSON form builder, and can be used like the following.

<html>
  <head>
    <link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css'>
    <link rel='stylesheet' href='https://cdn.form.io/formiojs/formio.full.min.css'>
    <script src='https://cdn.form.io/formiojs/formio.full.min.js'></script>
    <script type='text/javascript'>
      window.onload = function() {
        Formio.builder(document.getElementById('builder'), {}, {});
      };
    </script>
  </head>
  <body>
    <div id='builder'></div>
  </body>
</html>

This will create a robust Form builder embedded right within your own application. See Our Demo Page for an example.

Form Rendering

The following is a simple example on how to render a form within your HTML application.

<html>
  <head>
    <link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css'>
    <link rel='stylesheet' href='https://cdn.form.io/formiojs/formio.full.min.css'>
    <script src='https://cdn.form.io/formiojs/formio.full.min.js'></script>
    <script type='text/javascript'>
      window.onload = function() {
        Formio.createForm(document.getElementById('formio'), 'https://examples.form.io/example');
      };
    </script>
  </head>
  <body>
    <div id='formio'></div>
  </body>
</html>

This will render the following form within your application.

Alt text

You can also render JSON directly instead of referencing the embed URL from Form.io.

Formio.createForm(document.getElementById('formio'), {
  components: [
    {
      type: 'textfield',
      key: 'firstName',
      label: 'First Name',
      placeholder: 'Enter your first name.',
      input: true
    },
    {
      type: 'textfield',
      key: 'lastName',
      label: 'Last Name',
      placeholder: 'Enter your last name',
      input: true
    },
    {
      type: 'button',
      action: 'submit',
      label: 'Submit',
      theme: 'primary'
    }
  ]
});

This will render the JSON schema of the form within your application.

JSFiddle

A great way to play around with this renderer is to use JSFiddle, which serves as a good sandbox environment. Here is an example that you can fork and make your own!

http://jsfiddle.net/travistidwell/v38du9y1/

Wizard Rendering

This library can also be used to render a form wizard within your application using the same method as rendering a form. The determiniation on whether it should render as a wizard or not is based on the display property of the form schema being set to wizard.

<html>
  <head>
    <link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css'>
    <link rel='stylesheet' href='https://cdn.form.io/formiojs/formio.full.min.css'>
    <script src='https://cdn.form.io/formiojs/formio.full.min.js'></script>
    <script type='text/javascript'>
      window.onload = function() {
        Formio.createForm(document.getElementById('formio'), 'https://examples.form.io/wizard');
      };
    </script>
  </head>
  <body>
    <div id='formio'></div>
  </body>
</html>

Form Embedding

You can also use this library as a JavaScript embedding of the form using a single line of code. For example, to embed the https://examples.form.io/example form within your application you can simply use the following embed code.

<script src="https://cdn.form.io/formiojs/formio.embed.min.js?src=https://examples.form.io/example"></script>

For an example of how this looks and works, check out the following Form.io Form Embedding CodePen

Full Form Renderer Documentation

For a more complete documentation of how to utilize this library within your application go to the Form Renderer documentation within the Wiki

JavaScript SDK

In addition to having a Form Renderer within this application, you can also use this library as a JavaScript SDK in your application. For example, to load a Form, and then submit that form you could do the following within your JavaScript.

<html>
  <head>
    <script src='https://cdn.form.io/formiojs/formio.full.min.js'></script>
    <script type='text/javascript'>
      var formio = new Formio('https://examples.form.io/example');
      formio.loadForm().then(function(form) {
      
        // Log the form schema.
        console.log(form);
        
        formio.saveSubmission({data: {
          firstName: 'Joe',
          lastName: 'Smith',
          email: '[email protected]'
        }}).then(function(submission) {
        
          // Log the full submission object.
          console.log(submission);
        });
      });
    </script>
  </head>
</html>

You can also use this within an ES6 application as follows.

import Formio from 'formiojs';
let formio = new Formio('https://examples.form.io/example');
formio.loadForm((form) => {
  console.log(form);
  formio.saveSubmission({data: {
    firstName: 'Joe',
    lastName: 'Smith',
    email: '[email protected]'
  }}).then((submission) => {
    console.log(submission);
  });
});

JavaScript SDK Documentation.

For more complete documentation over the JavaScript SDK, please take a look at the JavaScript SDK within the wiki.

Full Developer API Documentation

To view the full SDK Documentation, go to Developer SDK Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].