form-js-qil
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

@bpmn-io/form-js

CI

View, edit and simulate JSON-based forms.

Usage

This library exports a form viewer, editor and playground.

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.

Create and simulate a form with input and output data

Create and simulate a form with input and output data:

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

const formPlayground = new FormPlayground({
  container: document.querySelector('#form-playground'),
  schema,
  data
});

See playground documentation for further details.

Resources

License

Use under the terms of the bpmn.io license.

Readme

Keywords

none

Package Sidebar

Install

npm i form-js-qil

Weekly Downloads

13

Version

1.1.3

License

SEE LICENSE IN LICENSE

Unpacked Size

7.01 MB

Total Files

23

Last publish

Collaborators

  • qilin2405