Skip to content

FormContext

@firecms/core


@firecms/core / FormContext

Defined in: types/fields.tsx:130

Context passed to custom fields

M extends Record<string, any> = any

optional collection: ResolvedEntityCollection<M>

Defined in: types/fields.tsx:153

Collection of the entity being modified


disabled: boolean

Defined in: types/fields.tsx:180


optional entity: Entity<M>

Defined in: types/fields.tsx:167


entityId: string

Defined in: types/fields.tsx:158

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


formex: FormexController<M>

Defined in: types/fields.tsx:178

This is the underlying formex controller that powers the form. If you are in a red only mode, the formex controller is there, but you can’t operate with it


openEntityMode: "side_panel" | "full_screen"

Defined in: types/fields.tsx:171


optional path: string

Defined in: types/fields.tsx:163

Path this entity is located at


save: (values) => void

Defined in: types/fields.tsx:148

Save the entity.

M

void


optional savingError: Error

Defined in: types/fields.tsx:169


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

Defined in: types/fields.tsx:143

Update the value of a field

string

any

boolean

void


status: "copy" | "new" | "existing"

Defined in: types/fields.tsx:165


values: M

Defined in: types/fields.tsx:135

Current values of the entity