SerenityJS
    Preparing search index...

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    formId: number = ++Form.formId

    The form id of the form.

    title: string

    The title of the form.

    type: ModalFormType

    The type of form.

    formId: number = 0

    The next form id to use when creating a new form.

    Methods

    • Show the form synchronously to a player.

      Parameters

      • player: Player

        The player to show the form to.

      • result: FormResult<T>

        The result callback to call when the form is submitted.

      Returns void

    • Show the form asynchronously to a player.

      Parameters

      • player: Player

        The player to show the form to.

      Returns Promise<Error | T>

      A promise that resolves with the form response or an error.

      If the form is cancelled, it resolves with an error.

      If the form is submitted, it resolves with the form response.