Files
firecms/website/docs/api/functions/cmsformfield.md
2021-06-06 13:36:47 +02:00

1.1 KiB

id, title, sidebar_label, sidebar_position, custom_edit_url
id title sidebar_label sidebar_position custom_edit_url
cmsformfield Function: CMSFormField CMSFormField 0 null

CMSFormField<T, S, Key>(__namedParameters): JSX.Element

This component renders a form field creating the corresponding configuration from a property. For example if bound to a string property, it will generate a text field.

You can use it when you are creating a custom field, and need to render additional fields mapped to properties. This is useful if you need to build a complex property mapping, like an array where each index is a different property.

Type parameters

Name Type
T T
S S: EntitySchema<Key, any, S>
Key Key: string = Extract<keyof S["properties"], string>

Parameters

Name Type
__namedParameters CMSFormFieldProps<S, Key>

Returns

JSX.Element

Defined in

form/form_factory.tsx:72