ping-identity
    Preparing search index...

    Type Alias JourneyFormResult

    Return contract for useJourneyForm.

    type JourneyFormResult = {
        attempted: boolean;
        buildInput: (
            overrides?: Partial<JourneyFormValues>,
        ) => JourneyBuildNextInputResult;
        canSubmit: boolean;
        clearValue: (fieldId: string) => void;
        fields: JourneyNormalizedField[];
        getField: (fieldId: string) => JourneyNormalizedField | undefined;
        getFieldByType: (
            callbackType: JourneyCallbackType,
            typeIndex?: number,
        ) => JourneyNormalizedField | undefined;
        getFieldsByType: (
            callbackType: JourneyCallbackType,
        ) => JourneyNormalizedField[];
        input: JourneyNextInput;
        issues: JourneySubmitIssue[];
        markAttempted: () => void;
        meta: JourneyFormMeta;
        reset: (nextValues?: JourneyFormValues) => void;
        setValue: (fieldId: string, value: JourneyFormValue) => void;
        setValueByType: (
            callbackType: JourneyCallbackType,
            value: JourneyFormValue,
            typeIndex?: number,
        ) => boolean;
        setValues: (updater: JourneyFormValuesUpdater) => void;
        values: JourneyFormValues;
    }
    Index

    Properties

    attempted: boolean

    True after the first JourneyFormResult.markAttempted call.

    Gate error display on this flag so validation messages only appear after the user has attempted submission. Resets to false on node change.

    buildInput: (
        overrides?: Partial<JourneyFormValues>,
    ) => JourneyBuildNextInputResult

    Builds a submit plan from current values plus optional overrides.

    Type Declaration

    canSubmit: boolean

    Indicates whether input can be safely submitted.

    clearValue: (fieldId: string) => void

    Removes one field value.

    Type Declaration

      • (fieldId: string): void
      • Parameters

        • fieldId: string

          Normalized field id.

        Returns void

        Void.

    Normalized callback fields for the active Journey node.

    getField: (fieldId: string) => JourneyNormalizedField | undefined

    Returns one normalized field by id.

    Type Declaration

    getFieldByType: (
        callbackType: JourneyCallbackType,
        typeIndex?: number,
    ) => JourneyNormalizedField | undefined

    Returns one normalized field by callback type and per-type index.

    Type Declaration

    getFieldsByType: (callbackType: JourneyCallbackType) => JourneyNormalizedField[]

    Returns normalized fields for a callback type.

    Type Declaration

    Submit payload derived from node + values.

    Planning issues detected for the current submit payload.

    markAttempted: () => void

    Marks the form as attempted.

    Type Declaration

      • (): void
      • Returns void

        Void.

    Call this when the user first tries to submit. Sets JourneyFormResult.attempted to true so the UI can gate error display on submission intent.

    Derived callback execution metadata.

    reset: (nextValues?: JourneyFormValues) => void

    Resets the full value map, then reapplies callback-provided defaults.

    Type Declaration

    setValue: (fieldId: string, value: JourneyFormValue) => void

    Sets one normalized field value.

    Type Declaration

    setValueByType: (
        callbackType: JourneyCallbackType,
        value: JourneyFormValue,
        typeIndex?: number,
    ) => boolean

    Sets one field value by callback type and per-type index.

    Type Declaration

    setValues: (updater: JourneyFormValuesUpdater) => void

    Merges one or more field values.

    Type Declaration

    Current form value map keyed by normalized field id.