Static Method Summary
| Static Public Methods | ||
| public static |
embed(embed: *): * |
|
Constructor Summary
| Public Constructor | ||
| public |
constructor(element: Object, form: Object | string, options: Object) Creates an easy to use interface for embedding webforms, pdfs, and wizards into your application. |
|
Member Summary
| Public Members | ||
| public |
|
|
| public |
element: * |
|
| public set |
Sets the form. |
|
| public get |
Returns the loaded forms JSON. |
|
| public |
instance: * |
|
| public |
options: * |
|
| public |
ready: * |
|
| public |
readyReject: * |
|
| public |
readyResolve: * |
|
| Private Members | ||
| private |
_form: * |
|
Method Summary
| Public Methods | ||
| public |
attach(element: *): * |
|
| public |
Build a new form. |
|
| public |
Create a new form instance provided the display of the form. |
|
| public |
empty() |
|
| public |
errorForm(err: *): {"components": *} |
|
| public |
getSubmission(formio: *): * |
|
| public |
render(): * |
|
| public |
sanitize(string: *): * Sanitize an html string. |
|
| public |
setContent(element: *, content: *): boolean |
|
| public |
setDisplay(display: string): Promise<T> Changes the display of the form. |
|
| public |
setForm(formParam: *): * |
|
Static Public Methods
Public Constructors
public constructor(element: Object, form: Object | string, options: Object) source
Creates an easy to use interface for embedding webforms, pdfs, and wizards into your application.
Params:
| Name | Type | Attribute | Description |
| element | Object | The DOM element you wish to render this form within. |
|
| form | Object | string | Either a Form JSON schema or the URL of a hosted form via. form.io. |
|
| options | Object | The options to create a new form instance. |
|
| options.readOnly | boolean | Set this form to readOnly |
|
| options.noAlerts | boolean | Set to true to disable the alerts dialog. |
|
| options.i18n | boolean | The translation file for this rendering. @see https://github.com/formio/formio.js/blob/master/i18n.js |
|
| options.template | boolean | Provides a way to inject custom logic into the creation of every element rendered within the form. |
Example:
import Form from 'formiojs/Form';
const form = new Form(document.getElementById('formio'), 'https://examples.form.io/example');
form.build();
Public Members
public element: * source
public set form(formParam: string | object): * source
Sets the form. Either as JSON or a URL to a form JSON schema.
Return:
| * |
public instance: * source
public options: * source
public ready: * source
public readyReject: * source
public readyResolve: * source
Private Members
private _form: * source
Public Methods
public create(display: string): * source
Create a new form instance provided the display of the form.
Params:
| Name | Type | Attribute | Description |
| display | string | The display of the form, either "wizard", "form", or "pdf" |
Return:
| * |
public empty() source
public errorForm(err: *): {"components": *} source
Params:
| Name | Type | Attribute | Description |
| err | * |
Return:
| {"components": *} |
public sanitize(string: *): * source
Sanitize an html string.
Params:
| Name | Type | Attribute | Description |
| string | * |
Return:
| * |
public setContent(element: *, content: *): boolean source
Params:
| Name | Type | Attribute | Description |
| element | * | ||
| content | * |
