@oneblink/apps-react
    Preparing search index...

    Function replaceInjectablesWithElementValues

    • Replace the {ELEMENT:<elementName>} values in text while a form is being filled out. The replacements are suppose to be user friendly and for display purposes, e.g. dates should be displayed in the user's desired format and timezone.

      Parameters

      • text: string
      • options: Omit<
            Parameters<typeof submissionService.replaceInjectablesWithElementValues>[1],
            keyof submissionService.ReplaceInjectablesFormatters,
        >

      Returns { hadAllInjectablesReplaced: boolean; text: string }

      • hadAllInjectablesReplaced: boolean

        Determine if replaceable strings could all be replaced. The text property returned will replace all injectable with empty strings if the value cannot be found. Use this boolean to either use the replaced string with missing data or implement some other logic to handle missing injectables.

      • text: string

        The text passed in with all injectables replaced with their corresponding values or empty strings.