Standards Docs

RecordForm

A form component for editing a single record with automatic mutation. Features: - Automatic save on change via `useUpdateRecord` - Optimistic updates with rollback on error - Query cache invalidation on success - Configurable icon rendering and placeholders

A form component for editing a single record with automatic mutation.

Features:

  • Automatic save on change via useUpdateRecord
  • Optimistic updates with rollback on error
  • Query cache invalidation on success
  • Configurable icon rendering and placeholders

Signature

({ recordId, object, defaultValues, onChange, onValuesChange, onRecordUpdated, groups, placeholder: placeholderProp, onRelationClick, onNavigate, className, style, onAddAttribute, onReorderFields, onReorderGroups, onMoveFieldToGroup, onGroupLabelChange, onRemoveField, onRemoveGroup, onAddField, onAddGroup, onGroupSelect, readOnly, }: RecordFormProps): Element

Examples

```tsx
<RecordForm
  recordId={contact.id}
  object={contactObject}
  defaultValues={contact.values}
  groups={viewDefinition.tabs[0].groups}
  onValuesChange={(values) => console.log("Values changed:", values)}
/>

On this page