Skip to main content
Version: 2.0.0

Interface: FormContext<M>

Context passed to custom fields

Type parameters

NameType
Mextends Record<string, any> = any

Properties

collection

collection: ResolvedEntityCollection<M>

Collection of the entity being modified

Defined in

packages/firecms/src/types/fields.tsx:129


entityId

Optional entityId: string

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

Defined in

packages/firecms/src/types/fields.tsx:139


path

path: string

Path this entity is located at

Defined in

packages/firecms/src/types/fields.tsx:144


save

save: (values: M) => void

Type declaration

▸ (values): void

Save the entity

Parameters
NameType
valuesM
Returns

void

Defined in

packages/firecms/src/types/fields.tsx:157


setFieldValue

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

Type declaration

▸ (key, value, shouldValidate?): void

Update the value of a field

Parameters
NameType
keystring
valueany
shouldValidate?boolean
Returns

void

Defined in

packages/firecms/src/types/fields.tsx:152


values

values: M

Current values of the entity

Defined in

packages/firecms/src/types/fields.tsx:134

Enterprise or start-up?

Learn how to get the most out of your project with the help of our consulting team.
Learn more
Sign up to our newsletter to get the latest news and updates. No spam!