Skip to main content

Overview

This guide documents the integration between the Forms & Workflow (FW) module and the Platform Foundation modules:
  • PF-15: Picklist System
  • PF-16: Custom Field Definitions
  • PF-17: Entity Field Configuration

Architecture

Integration Points

1. Unified Field Type System (Step 6.2)

Location: src/platform/field-config/fieldTypes.ts The FIELD_TYPE_REGISTRY provides a single source of truth for field types across both FW and PF-17.

2. Picklist Data Source (Steps 6.1 & 6.4)

FW Form Builder now supports PF-15 picklists as a data source option alongside static options and table lookups. Usage in FieldEditorDialog:
Saved Field Settings:

3. Shared Field Renderers (Step 6.3)

Location: src/platform/forms/components/fields/ Common field components used by both FormRenderer and DynamicFormRenderer: SelectField automatically handles all three data sources:

4. Section/Page Mapping (Step 6.5)

Location: src/platform/forms/utils/sectionPageMapping.ts Maps PF-17 field_section to FW-05 form pages:

5. Entity Mapping Workflow Action (Step 6.6)

Component: src/cores/fw/components/EntityMappingActionConfig.tsx Edge Function: supabase/functions/process-entity-mapping/ Maps form submission data to entity table columns and custom_fields JSONB. Configuration:
Edge Function Usage:

Migration Guide

Updating Existing Forms to Use Picklists

  1. Identify candidates: Forms using static select options that should be centrally managed
  2. Create picklist: In Settings → Picklists, create the picklist with items
  3. Update form field: Edit the field, change Data Source to “Picklist”, select the picklist

Using Shared Field Components

Before (inline rendering in FormRenderer):
After (using shared components):

Best Practices

  1. Prefer picklists over static options when values are reused across forms or need central management
  2. Use shared field components to ensure consistent styling and behavior
  3. Map to custom_fields for organization-specific data that doesn’t fit standard columns
  4. Test entity mappings with create before enabling update/upsert operations