Open Forms TS types
    Preparing search index...

    Interface FieldsetComponentSchema

    Component shape/options for a fieldset 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 FieldsetComponentSchema {
        clearOnHide?: boolean;
        components: AnyComponentSchema[];
        conditional?: {
            eq?: string | number | boolean;
            show?: boolean;
            when?: string;
        };
        hidden?: boolean;
        hideHeader: boolean;
        id: string;
        key: string;
        label: string;
        openForms?: {
            translations?: { en?: { label?: string }; nl?: { label?: string } };
        };
        tooltip?: string;
        type: "fieldset";
    }
    Index

    Properties

    clearOnHide?: boolean

    Clear the value (remove the key from the submission data) when the field is hidden. This is applied if the component itself or any parent is hidden, irrespective the mechanism that made it hidden.

    Related: hidden, conditional.

    components: AnyComponentSchema[]

    Nested components/fields inside the fieldset.

    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.

    hidden?: boolean

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

    hideHeader: boolean

    Control whether the fieldset header/legend is displayed or not.

    This should probably use the built-in hideLabel property instead, which requires a backend data migration and update to the SDK code.

    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.
    
    label: string

    The form field label text.

    openForms?: {
        translations?: { en?: { label?: string }; nl?: { label?: string } };
    }
    tooltip?: string

    Extra information or background for the form field. Displayed after interacting with the tooltip icon/control near the label.

    type: "fieldset"

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