bothy-sdk
    Preparing search index...

    Function form

    • Builds a form.

      Parameters

      • customId: string

        ID of the component in its message.

      • title: string

        Display text.

      • fields: readonly FormField[]

        At least one and at most component.form_max_fields fields with distinct names.

      • options: FormOptions = {}

        Submit label and the shared members of ComponentOptions.

      Returns {}

      The generated ComponentCreate.

      RangeError when a value breaks a rule of component.v1; the message names the field.

      form("trip", "Trip details", [{ name: "destination", label: "Destination", type: "text" }]);