@oneblink/sdk-core
    Preparing search index...

    Function injectFormElementsIntoForms

    • Async counterpart to injectFormElementsIntoForm. Injects embedded form / infoPage elements for each form in forms. Uses getForm to load embedded forms and caches results by id for the duration of the call so each form is retrieved at most once across the whole batch.

      Mutates each form object in forms in place (the array entries are updated by reference); nothing is returned. Forms returned from getForm are not mutated — their element trees are cloned before embedding.

      Parameters

      • forms: Form[]

        The forms to inject elements into (mutated in place)

      • getForm: (formId: number) => Promise<Form | undefined>

        Retrieves a single form by id when it is referenced by a form / infoPage element

      • injectAuthenticatedForms: boolean = true

        Indicates whether forms requiring authentication should be injected, defaults to true

      Returns Promise<void>