@camunda-community/form-js-viewer

Extended version. View forms - powered by bpmn.io


License
ICU
Install
npm install @camunda-community/form-js-viewer@0.7.8

Documentation

@camunda-community/form-js

Community Extension Compatible with: Camunda Platform 8

View and visually edit JSON-based forms.

Forked from @bpmn-io/form-js

local dev

You should install cross-env. If you want to release, you should also install npm-run-all

npm install
npm install --save-dev cross-env
npm install npm-run-all --save-dev

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 '@camunda-community/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 '@camunda-community/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.

Release

npm run release