@open-formulieren/types
    Preparing search index...

    Interface SignatureComponentSchema

    The built-in Formio.js signature component type.

    Source code this is based on: https://github.com/formio/formio.js/blob/4.13.x/src/components/signature/Signature.js

    Note that we don't offer support for many properties through our form builder, like:

    • width
    • height
    • penColor
    • backgroundColor
    • minWidth
    • maxWidth

    Because of that, they are also not added to the type definitions (yet). That may change once we implement our own renderer.

    interface SignatureComponentSchema {
        clearOnHide?: boolean;
        conditional?: OFConditionalOptions;
        defaultValue?: "" | `data:image/png;base64,${string}`;
        description?: string;
        errors?: Object & ComponentErrors<"required">;
        footer?: string;
        hidden?: boolean;
        id: string;
        isSensitiveData?: boolean;
        key: string;
        label: string;
        openForms?: { translations: ComponentTranslations<TK> };
        registration?: { attribute: string };
        showInEmail?: boolean;
        showInPDF?: boolean;
        showInSummary?: boolean;
        tooltip?: string;
        translatedErrors?: ErrorTranslations<"required">;
        type: "signature";
        validate?: OFValidateOptions<"required" | "plugins">;
    }

    Hierarchy

    • Omit<
          SignatureInputSchema,
          "hideLabel"
          | "disabled"
          | "placeholder"
          | "validateOn"
          | "multiple",
      >
      • SignatureComponentSchema
    Index

    Properties

    clearOnHide?: boolean

    If the value of this field should be cleared when it is conditionally hidden.

    conditional?: OFConditionalOptions

    Dynamically determines if the component is visible/available.

    defaultValue?: "" | `data:image/png;base64,${string}`

    The value type of the component. We don't support multiple: true in this component.

    Note that we use the defaultValue property to infer the value type, we do not support actually setting a component default value.

    description?: string
    errors?: Object & ComponentErrors<"required">

    Allows customizable errors to be displayed for each component when an error occurs. This is an object with the following keys: required min max minLength maxLength invalid_email invalid_date pattern custom

    An object (keys listed above), values are the strings you wish to display. Each string has the {{ field }} to use within the string. Example. {"required": "{{ field }} is required. Try again."}

    footer?: string

    The footer is a text displayed below the drawing canvas which may hint the user on what is expected of them.

    I'm not sure what the difference is with the 'description' field.

    hidden?: boolean

    Determines if the component should be within the form, but not visible. This can be overridden with the conditionals.

    id: string
    isSensitiveData?: boolean
    key: string

    The data key for this component (how the data is stored in the database, referenced as API key in docs).

    label: string

    The HTML label to give this component.

    openForms?: { translations: ComponentTranslations<TK> }
    registration?: { attribute: string }
    showInEmail?: boolean
    showInPDF?: boolean
    showInSummary?: boolean
    tooltip?: string
    translatedErrors?: ErrorTranslations<"required">
    type: "signature"
    validate?: OFValidateOptions<"required" | "plugins">