Module: JsonSchemaForms

The main module implementing the form construction.

Source:

Methods

(inner) build(schema, submitCallbackopt, customFormOptions) → {HTMLDivElement}

Builds an HTML form from a given JSON Schema. The main function to be interacted by users.

It allows to provide specific options for the form construction, and a custom callback function triggered on submission.

Parameters:
Name Type Attributes Default Description
schema object

The JSON Schema to represent as an HTML form.

submitCallback function <optional>
() => {}

Callback function to be called when the form triggers the submit DOM event.

customFormOptions object

Form options overriding the default. See defaultFormOptions for details.

Source:
Returns:

A <div> element containing the HTML form.

Type
HTMLDivElement