1. Actions
  2. Fields

Actions

Fields

Fields are where user/AI input gets captured in Stubber.

Basic Info

Fields are configured inside the editor platform and are used to capture user input on a form shown to the user on the Inbox platform.

On Editor Platform:

Field Editor

The action preview seen above indicates how the form will be rendered on the Inbox platform.

Parameters

name

string

The unique name of the field within your form


fieldtype

string

Sets the field component to render in the form. Any of the documented field types

Default: text


title

Used to set the label of the field.

Default: human readable version of [name]


hide_label

Can be set to true if you don't want the field to show a label.

Default: false


details.keyname

Used to set where in data to write the field value to

Default: [name]


details.datapath

Used to nest the field's value deeper inside data

Default: ''


initvalue.default

Used to set the default value of the field if the field has not been set before.


initvalue.override

Used to set the default value of the field, even if it had already been set previously.


conditions

string[]

Used to conditionally render a field.
Array of jsonata expressions that evaluate using the fieldContext

Default: []

Example Condition
        ["form.data.gender = 'male'"]

      

validations

Used to validate a field's value and prevent the form from being submitted if the validation fails.

Default: {}

Example Validations
        {
  "is_required_validation": {
    "validationtype": "required",
    "valid_message": "Looks good!",
    "invalid_message": "This field is required"
  },
  "passes_regex_check": {
    "validationtype": "regex",
    "params": {
      "regex": "regex here"
    },
    "invalid_message": "something is wrong"
  },
  "jsonata_check": {
    "validationtype": "jsonata",
    "params": {
      "jsonata": "field.data = 5"
    },
    "invalid_message": "something is wrong"
  }
}

      

params

Params allows configuring field specific settings, like options for a select field, or columns for a grid field.

See the specific field pages for more information.