dynamic-forms / Function

mapFieldToForm

Maps a field definition to the Angular Signal Forms schema.

This is the main entry point that should be called from the dynamic form component. It handles all field types: leaf fields, containers (page, row, group), and arrays.

Cross-field logic (formValue.*) is handled automatically by createLogicFunction which uses RootFormRegistryService.

Cross-field validators are skipped at field level and applied at form level via validateTree.

Presentation

function mapFieldToForm(
  fieldDef: FieldDef<unknown>,
  fieldPath: AnySchemaPath,
): void;

Returns

void

Parameters

NameTypeDescription
fieldDef
FieldDef<unknown>
fieldPath
AnySchemaPath