ping-identity
    Preparing search index...

    Type Alias DaVinciFormResult

    Return contract for useDaVinciForm.

    Parallels JourneyFormResult from the Journey package. fields replaces the older collectors name for parity with Journey.

    type DaVinciFormResult = {
        buildInput: (
            overrides?: Partial<DaVinciFormValues>,
        ) => DaVinciBuildNextInputResult;
        canSubmit: boolean;
        clearValue: (key: string) => void;
        fields: DaVinciNormalizedCollector[];
        getField: (key: string) => DaVinciNormalizedCollector | undefined;
        getFieldByType: (
            type: string,
            typeIndex?: number,
        ) => DaVinciNormalizedCollector | undefined;
        getFieldsByType: (type: string) => DaVinciNormalizedCollector[];
        input: DaVinciNextInput;
        issues: DaVinciSubmitIssue[];
        meta: DaVinciFormMeta;
        reset: (nextValues?: DaVinciFormValues) => void;
        setValue: (
            key: string,
            value: DaVinciFormValue,
        ) => void | Promise<DaVinciNode>;
        setValueByType: (
            type: string,
            value: DaVinciFormValue,
            typeIndex?: number,
        ) => boolean;
        setValues: (updater: DaVinciFormValuesUpdater) => void;
        submitFlow: (flowKey: string) => Promise<DaVinciNode>;
        values: DaVinciFormValues;
    }
    Index

    Properties

    buildInput: (
        overrides?: Partial<DaVinciFormValues>,
    ) => DaVinciBuildNextInputResult

    Builds a fresh submit plan for the current node and optional value overrides.

    Type Declaration

    canSubmit: boolean

    Indicates whether input can be safely submitted.

    clearValue: (key: string) => void

    Removes one collector field value from form state.

    Type Declaration

      • (key: string): void
      • Parameters

        • key: string

          Collector key.

        Returns void

    Normalized collector fields for the active ContinueNode.

    getField: (key: string) => DaVinciNormalizedCollector | undefined

    Returns one normalized collector field by key.

    Type Declaration

    getFieldByType: (
        type: string,
        typeIndex?: number,
    ) => DaVinciNormalizedCollector | undefined

    Returns one normalized collector field by type string and per-type index.

    Type Declaration

      • (type: string, typeIndex?: number): DaVinciNormalizedCollector | undefined
      • Parameters

        • type: string

          Collector type string.

        • OptionaltypeIndex: number

          Optional zero-based index within the type group (defaults to 0).

        Returns DaVinciNormalizedCollector | undefined

        Matching field or undefined.

    getFieldsByType: (type: string) => DaVinciNormalizedCollector[]

    Returns all normalized collector fields for a given type string.

    Type Declaration

    Submit payload derived from node + values.

    Planning issues detected for the current submit payload.

    Derived collector execution metadata.

    reset: (nextValues?: DaVinciFormValues) => void

    Resets the full value map and reapplies collector-provided defaults.

    Type Declaration

    setValue: (key: string, value: DaVinciFormValue) => void | Promise<DaVinciNode>

    Sets one collector field value.

    Type Declaration

    When key identifies a FlowCollector (ACTION, FLOW_BUTTON, FLOW_LINK), this immediately calls next() with only that key — bypassing all other field values — instead of updating form state, and returns the pending navigation Promise. Callers that don't need the result may ignore the return value.

    When a FlowCollector key is set and progression fails.

    setValueByType: (
        type: string,
        value: DaVinciFormValue,
        typeIndex?: number,
    ) => boolean

    Sets one field value using collector type string and optional index.

    Type Declaration

      • (type: string, value: DaVinciFormValue, typeIndex?: number): boolean
      • Parameters

        • type: string

          Collector type string.

        • value: DaVinciFormValue

          New field value.

        • OptionaltypeIndex: number

          Optional zero-based index within the type group (defaults to 0).

        Returns boolean

        True when a matching field was found and updated.

    Delegates to setValue — see its @remarks for FlowCollector auto-submit behavior.

    setValues: (updater: DaVinciFormValuesUpdater) => void

    Merges one or more collector field values.

    Type Declaration

    submitFlow: (flowKey: string) => Promise<DaVinciNode>

    Submits a FlowCollector by key, bypassing all other field values.

    Type Declaration

      • (flowKey: string): Promise<DaVinciNode>
      • Parameters

        • flowKey: string

          Flow collector key.

        Returns Promise<DaVinciNode>

        Next flow node.

    Explicit variant of the auto-submit setValue performs when its key is a FlowCollector — useful when the flow key isn't already wired to a setValue call (e.g. a hardcoded "Forgot password?" button).

    When progression fails.

    Current form value map keyed by collector key.