Skip to main content

Interface: FormComponent

Thrive Form Component

Hierarchy

Properties

components

Optional Readonly components: FormComponent[]

Sub components


conditional

Optional Readonly conditional: object

A json-logic conditional that upon evaluation, will show or hide the component.

Other fields in the form will be addressable by name as variables to the conditional.

Example

    { "!!": { "var": "show_something_toggle" } }
```;

**`Link`**

https://jsonlogic.com/

___

### defaultValue

• `Optional` `Readonly` **defaultValue**: `string` \| `number` \| `boolean`

The default value of the component

___

### label

• `Optional` `Readonly` **label**: `string` \| `MessageDescriptor`

The label for the component

___

### name

• `Readonly` **name**: `string`

The name of the component

___

### prefix

• `Optional` `Readonly` **prefix**: `string`

Optional markdown prefix.

___

### suffix

• `Optional` `Readonly` **suffix**: `string`

Optional markdown suffix.

___

### type

• `Readonly` **type**: [`FormComponentType`](/api/enums/FormComponentType)

The type of component (e.g. text, number, select, etc.)

___

### validate

• `Optional` `Readonly` **validate**: [`ValidationSchema`](/api/interfaces/ValidationSchema)

Validations