Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Overview

This document tracks the integration of CustomFieldsSection (PF-16) into entity forms.

Forms Using ConfigurableForm (Automatic Custom Fields)

Forms migrated to ConfigurableForm automatically include custom fields:
  • hr_employees - EmployeeFormDialog (uses ConfigurableForm)
  • fa_customers - CustomerForm (uses ConfigurableForm)
Note: ConfigurableForm’s DynamicFormRenderer automatically renders custom fields when:
  • Field configs exist with field_source = 'custom'
  • Custom field definitions exist for the entity type
  • Field configs have is_visible = true for the current role

Forms Needing CustomFieldsSection

For forms that haven’t been migrated to ConfigurableForm, add CustomFieldsSection: Example:
import { CustomFieldsSection } from '@/platform/custom-fields';

export function MyEntityForm({ entity, onSubmit }) {
  const form = useForm({...});
  
  return (
    <Form {...form}>
      {/* Standard fields */}
      <FormField name="name" ... />
      
      {/* Custom fields section */}
      <CustomFieldsSection
        entityType="hr_employees"
        control={form.control}
        title="Additional Information"
      />
      
      <Button type="submit">Save</Button>
    </Form>
  );
}

Integration Checklist

  • hr_employees - EmployeeFormDialog (via ConfigurableForm)
  • fa_customers - CustomerForm (via ConfigurableForm)
  • Other entity forms (add CustomFieldsSection as needed)

Notes

  • ConfigurableForm automatically handles custom fields - no separate component needed
  • CustomFieldsSection is for non-ConfigurableForm forms only
  • Custom fields are stored in custom_fields JSONB column
  • Field definitions are managed at /settings/custom-fields