geogerytony / form-js

View and visually edit JSON-based forms.

Home Page:https://bpmn.io/toolkit/form-js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@bpmn-io/form-js

CI

View and visually edit JSON-based forms.

Usage

This library exports a form viewer and editor.

Display a Form

Renders a form based on a form schema and existing data:

import { Form } from '@bpmn-io/form-js';

const form = new Form({
  container: document.querySelector('#form')
});

await form.importSchema(schema, data);

form.on('submit', (event) => {
  console.log(event.data, event.errors);
});

See viewer documentation for further details.

Create and Edit a Form

Create a new form or edit an exsting one:

import { FormEditor } from '@bpmn-io/form-js';

const formEditor = new FormEditor({
  container: document.querySelector('#form-editor')
});

await formEditor.importSchema(schema);

See editor documentation for further details.

Resources

License

Use under the terms of the bpmn.io license.

About

View and visually edit JSON-based forms.

https://bpmn.io/toolkit/form-js/

License:Other


Languages

Language:JavaScript 93.7%Language:CSS 5.3%Language:Shell 0.8%Language:TypeScript 0.2%