Interface: IFormStorage
@react-form-builder/designer.IFormStorage
Interface for storing forms in an external storage.
Properties
getForm
• getForm: (formName
: string
) => Promise
<string
>
Type declaration
▸ (formName
): Promise
<string
>
Returns the form serialized in JSON by the form name.
Parameters
Name | Type | Description |
---|---|---|
formName | string | the form name. |
Returns
Promise
<string
>
the Promise with the form serialized in JSON.
getFormNames
• getFormNames: () => Promise
<string
[]>
Type declaration
▸ (): Promise
<string
[]>
Returns
Promise
<string
[]>
the Promise with an array of form names.
removeForm
• removeForm: (formName
: string
) => Promise
<any
>
Type declaration
▸ (formName
): Promise
<any
>
Removes the form by form name.
Parameters
Name | Type | Description |
---|---|---|
formName | string | the form name. |
Returns
Promise
<any
>
the Promise with the result of removal.
saveForm
• saveForm: (formName
: string
, formValue
: string
) => Promise
<any
>
Type declaration
▸ (formName
, formValue
): Promise
<any
>
Saves the form serialized in JSON.
Parameters
Name | Type | Description |
---|---|---|
formName | string | the form name. |
formValue | string | the form serialized in JSON. |
Returns
Promise
<any
>
the Promise with the result of saving the form.