Kaizen
Browse modulesFormsforms/sharedFunctions

Function: fieldTypeIdentity()

function fieldTypeIdentity(type: 
  | "number"
  | "date"
  | "file"
  | "email"
  | "url"
  | "select"
  | "text"
  | "checkbox"
  | "textarea"
  | "phone"
  | "radio-group"
  | "multiselect"
  | "field-array"
  | "image"
  | "file-download"
  | "section-header"
  | "section-unset"
  | "signature"
  | "signature-adopted", signatureMode?: "typed" | "drawn"): string;

Defined in: shared/forms/field-types.ts:59

A field's cross-version identity for the "a field name's answer shape can't change between versions" guard. Collapses the signature-adopted alias to signature (so the soft migration is a no-op), but keeps signatureMode in the key — a signature field's typed ({ signerName, adopted }) and drawn ({ fileId }) values are structurally different, so flipping the mode is a real answer-shape change and must be treated as a conflict.

Parameters

ParameterType
type| "number" | "date" | "file" | "email" | "url" | "select" | "text" | "checkbox" | "textarea" | "phone" | "radio-group" | "multiselect" | "field-array" | "image" | "file-download" | "section-header" | "section-unset" | "signature" | "signature-adopted"
signatureMode?"typed" | "drawn"

Returns

string

On this page