HybridForms API
    Preparing search index...

    Class Form

    Static properties and methods related to the current form.

    Index

    Constructors

    Methods

    • Adds an event listener to the form class.

      Parameters

      • type: "beforeApprove"

        type of event listener, defined in the FormEventsEnum

      • callback: () => Promise<void>

      Returns void

    • Add or update an attachment with the given file name.

      Parameters

      • filename: string

        string, the name of the file.

      • blob: Blob

        Blob, blob to add or update

      Returns Promise<IFormAttachment>

    • This function copies the current form and returns a promise that resolves to the new form.

      Parameters

      • OptionaldeleteFields: boolean

        boolean - If true, the copied form will remove marked fields.

      Returns Promise<any>

      A promise that will resolve to a new Form object.

    • Delete an attachment with the given file name.

      Parameters

      • filename: string

        string, the name of the file.

      Returns Promise<void>

    • Disable the automatic saving of the form.

      Returns void

    • Prevent notify mutated event gets fired.

      Returns void

    • Enable the automatic saving of the form.

      Returns void

    • Enable notify mutated event.

      Returns void

    • Returns the actual file path of an attachment with the given file name.

      Parameters

      • filename: string

        string, the name of the file.

      Returns Promise<string>

    • Get the creation date of the current form.

      Returns Date

    • Get the group infos about the current form.

      Returns IGroup

    • Get the last modified date of the current form.

      Returns Date

    • Get the status of the current form.

      Returns Status

    • Checks wether the form has an attachment with the given file name.

      Parameters

      • filename: string

        string, the name of the file.

      Returns boolean

    • Always remove previously registered event listeners!

      Parameters

      • type: "beforeApprove"

        type of event listener, defined in the FormEventsEnum

      • callback: () => Promise<void>

      Returns void

    • Save the current form.

      Returns Promise<any>