Skip to main content
Version: 3.0.0-beta

Interface: FormContext<M>

Context passed to custom fields

Type Parameters​

• M extends Record<string, any> = any

Properties​

collection?​

optional collection: ResolvedEntityCollection<M>

Collection of the entity being modified

Defined in​

packages/firecms_core/src/types/fields.tsx:151


entityId​

entityId: string

Entity id, it can be null if it's a new entity

Defined in​

packages/firecms_core/src/types/fields.tsx:156


formex​

formex: FormexController<M>

This is the underlying formex controller that powers the form

Defined in​

packages/firecms_core/src/types/fields.tsx:166


path?​

optional path: string

Path this entity is located at

Defined in​

packages/firecms_core/src/types/fields.tsx:161


save()​

save: (values) => void

Save the entity.

Parameters​

• values: M

Returns​

void

Defined in​

packages/firecms_core/src/types/fields.tsx:146


setFieldValue()​

setFieldValue: (key, value, shouldValidate?) => void

Update the value of a field

Parameters​

• key: string

• value: any

• shouldValidate?: boolean

Returns​

void

Defined in​

packages/firecms_core/src/types/fields.tsx:141


values​

values: M

Current values of the entity

Defined in​

packages/firecms_core/src/types/fields.tsx:133

Sign up to our newsletter to get the latest news and updates. No spam!