Skip to content

FieldComponentProps

FieldComponentProps = object

Defined in: packages/forms/src/types.ts:401

Props passed to field components by the auto-generated form.

Both built-in plugin components and custom components provided via FieldConfig.component receive these props.

optional enumValues: string[]

Defined in: packages/forms/src/types.ts:415

Available options for select/enum fields.


optional error: string

Defined in: packages/forms/src/types.ts:413

Validation error message, if any.


optional form: UseFormReturn<FieldValues>

Defined in: packages/forms/src/types.ts:430

Underlying react-hook-form instance, exposed so non-register components (like the upload field, which is controlled by value / onChange) can call setValue and getValues directly. Optional so existing field components — which only need register — keep working.


label: string

Defined in: packages/forms/src/types.ts:405

Human-readable label for the field.


name: string

Defined in: packages/forms/src/types.ts:403

The field name, used as the form registration key.


optional placeholder: string

Defined in: packages/forms/src/types.ts:407

Optional placeholder text for the input.


optional readOnly: boolean

Defined in: packages/forms/src/types.ts:411

Whether the field should be rendered as read-only (disables editing).


register: UseFormRegister<FieldValues>

Defined in: packages/forms/src/types.ts:417

The react-hook-form register function for binding the input to form state.


required: boolean

Defined in: packages/forms/src/types.ts:409

Whether the field is required (NOT NULL in the schema).


optional upload: UploadFieldMetadata

Defined in: packages/forms/src/types.ts:423

Upload field metadata, only set when the resolved field is an upload column. The plugin’s upload component reads filetype, multiple, maxFiles, etc. from this object instead of from register.