Class: FormCtrlCLI

FormCtrlCLI(setupopt, parent)

A class representing a command-line interface for form control.

Constructor

new FormCtrlCLI(setupopt, parent)

Creates an instance of FormCtrlCLI.

Parameters:
Name Type Attributes Description
setup Object <optional>

The setup options for the form control CLI.

Properties
Name Type Attributes Default Description
mode string <optional>
'create'

The mode of the form control CLI ('edit' or 'create').

schema Object <optional>
{}

The schema for the form control CLI.

defaultData Object <optional>
{}

The default data for the form control CLI.

exclude Array.<string> <optional>
[]

The list of fields to exclude from the form control CLI.

parent Object

The parent object of the form control CLI.

Source:

Methods

buildFormData() → {Object}

Builds the form data for the form control CLI.

Source:
Returns:

The form data for the form control CLI.

Type
Object

getFieldSchema(path) → {*}

Get the field schema.

Parameters:
Name Type Description
path string

The path of the field schema.

Source:
Returns:
  • The field schema.
Type
*

setField(key, value)

Sets a field in the form data.

Parameters:
Name Type Description
key string

The key of the field to set.

value any

The value to set for the field.

Source:

setForm(schema) → {void}

Set a new form on the the PoolForm

Parameters:
Name Type Description
schema Object

The schema object to set

Source:
Returns:
Type
void

setSchema(schema)

Sets the schema for the form control CLI.

Parameters:
Name Type Description
schema Object

The schema to set.

Source: