Open Forms TS types
    Preparing search index...

    Interface ContentComponentSchema

    Component shape/options for a content (rich text) component.

    The generated documentation might be slightly off due to rendering the type alias as an interface. Double check with the actual TS types!

    interface ContentComponentSchema {
        conditional?: {
            eq?: string | number | boolean;
            show?: boolean;
            when?: string;
        };
        customClass?: ""
        | "error"
        | "success"
        | "info"
        | "warning";
        hidden?: boolean;
        html: string;
        id: string;
        key: string;
        openForms?: {
            translations?: { en?: { html?: string }; nl?: { html?: string } };
        };
        showInEmail?: boolean;
        showInPDF?: boolean;
        showInSummary?: boolean;
        type: "content";
    }
    Index

    Properties

    conditional?: { eq?: string | number | boolean; show?: boolean; when?: string }

    Type declaration

    • Optionaleq?: string | number | boolean

      The value that should be checked against the reference component value.

      For array values (of the reference component), the array is checked if it contains the specified value.

      Only (a subset of) primitives are supported.

    • Optionalshow?: boolean

      Whether the field should be shown (true) or hidden (false) when the condition is met.

    • Optionalwhen?: string

      The reference component key. Its value will be retrieved and tested against eq.

    customClass?: "" | "error" | "success" | "info" | "warning"

    A custom CSS class/modifier to apply to convey the type of information.

    hidden?: boolean

    Hide or show the form field. This only controls the visibility - whether submission data is retained or not is controlled through clearOnHide.

    html: string

    Rich text content, in HTML form. It may be post-processed by the backend for compatibility with CSP headers.

    id: string

    Unique ID for a component in a form definition. Used to render HTML IDs.

    The new renderer does not need this.

    key: string

    Unique key for the component in a larger form definition.

    The value must comply with the (\w|\w[\w.\-]*\w) regex, meaning that periods/dots are allowed unless they're start or end. The period character creates a nesting level in the submission data.

    'myField'
    
    'parent.child' // creates `{parent: {child: <value}}` data.
    
    openForms?: {
        translations?: { en?: { html?: string }; nl?: { html?: string } };
    }
    showInEmail?: boolean

    Include the component and its value in the confirmation email data.

    showInPDF?: boolean

    Include the component and its value in the submission report PDF available for download by the end-user and often included in registration plugins.

    showInSummary?: boolean

    Include the component and its value in the submission data summary on the confirmation page or not.

    type: "content"

    Discriminator to determine the component type. Uniquely determines the shape of the component configuration options.