Skip to content

Form Controls

Classes of Form controls like “form:text”, “form:textarea”, “form:password” …

(The main objective of the current minimal implementation of forms is to parse the existing form contents in a document.)

Classes:

Name Description
FormButton

A button control, “form:button”.

FormCheckbox

An on/off control, “form:checkbox”.

FormColumn

A column in a form grid control, “form:column”.

FormCombobox

A control which allows displaying and editing of text, and contains

FormDate

A control for inputting date data, “form:date”.

FormFile

A control for or selecting a file, “form:file”.

FormFixedText

A control which attaches additional information to controls, or

FormFormattedText

A control for inputting text, which follows the format defined by a

FormFrame

A frame in which controls may be visually arranged, “form:frame”.

FormGenericControl

An implementation-defined placeholder for a generic control, “form:generic-control”.

FormGrid

A control a control that displays table data, “form:grid”.

FormHidden

A control that does not have a visual representation, “form:hidden”.

FormImage

A graphical button control, “form:image”.

FormImageFrame

A graphical control displaying an image, “form:image-frame”.

FormItem

A list item for a FormCombobox control, “form:item”.

FormListbox

An input control that allows a user to select one or more items from

FormNumber

A control which allows the user to enter a floating-point number,

FormOption

A list item for a “form:option” control, “form:option”.

FormPassword

A control that uses an echo character to hide password input by a user, “form:password”.

FormRadio

A control which acts like a check box except that when multiple radio

FormText

A control for displaying and inputting text on a single line, “form:text”.

FormTextarea

A control for displaying and inputting text on multiple lines,

FormTime

A control for inputting time data, “form:time”.

FormValueRange

A control which allows the user to select a value from a number range,

FormButton

Bases: OfficeTargetFrameMixin, FormDelayRepeatMixin, FormImageAlignMixin, FormImagePositionMixin, FormButtonTypeMixin, FormGrid

A button control, “form:button”.

Methods:

Name Description
__init__

Create a FormButton, “form:button”.

Attributes:

Name Type Description
button_type
default_button
delay_for_repeat
focus_on_click
href
image_align
image_data
image_position
label
repeat
target_frame
toggle
value
xforms_submission
Source code in odfdo/form_controls.py
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
class FormButton(
    OfficeTargetFrameMixin,
    FormDelayRepeatMixin,
    FormImageAlignMixin,
    FormImagePositionMixin,
    FormButtonTypeMixin,
    FormGrid,
):
    """A button control, "form:button"."""

    _tag = "form:button"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDefBool("default_button", "form:default-button", False),
        PropDef("repeat", "form:repeat"),
        PropDefBool("disabled", "form:disabled", False),
        PropDef("focus_on_click", "form:focus-on-click"),
        PropDef("image_data", "form:image-data"),
        PropDef("label", "form:label"),
        PropDefBool("toggle", "form:toggle", False),
        PropDef("value", "form:value"),
        PropDef("href", "xlink:href"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("xforms_submission", "form:xforms-submission"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        title: str | None = None,
        label: str | None = None,
        button_type: str | None = None,
        default_button: bool | None = None,
        control_implementation: str | None = None,
        repeat: bool | None = None,
        delay_for_repeat: str | None = None,
        disabled: bool | None = None,
        focus_on_click: bool | None = None,
        image_align: str | None = None,
        image_position: str | None = None,
        image_data: str | None = None,
        value: str | None = None,
        toggle: bool | None = None,
        target_frame: str | None = None,
        href: str | None = None,
        printable: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        xforms_submission: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormButton, "form:button".

        The "form:button" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            title: The title or tooltip of the control.
            disabled: If True, the control is disabled.
            printable: If True, the control is printable.
            repeat: If True, the control repeats when a button is clicked.
            delay_for_repeat: The delay for repeating the action. Defaults to "PT0.050S".
            tab_index: The tab order of the control.
            tab_stop: If True, the control is a tab stop.
            button_type: The type of the button.
            default_button: If True, this is the default button.
            focus_on_click: If True, the button gets the focus when clicked.
            image_align: The alignment of the image.
            image_data: The image data for the button.
            image_position: The position of the image.
            label: The label of the button.
            toggle: If True, the button is a toggle button.
            target_frame: The target frame for the URL.
            href: The URL to navigate to when the button is clicked.
            xml_id: The unique XML ID.
            xforms_submission: The XForms submission to use.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            disabled=disabled,
            printable=printable,
            title=title,
            tab_index=tab_index,
            tab_stop=tab_stop,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if value is not None:
                self.value = value
            if button_type is not None:
                self.button_type = button_type
            if default_button is not None:
                self.default_button = default_button
            if repeat is not None:
                self.repeat = repeat
            if delay_for_repeat is not None:
                self.delay_for_repeat = delay_for_repeat
            if focus_on_click is not None:
                self.focus_on_click = focus_on_click
            if image_align is not None:
                self.image_align = image_align
            if image_data is not None:
                self.image_data = image_data
            if image_position is not None:
                self.image_position = image_position
            if label is not None:
                self.label = label
            if toggle is not None:
                self.toggle = toggle
            if xforms_submission is not None:
                self.xforms_submission = xforms_submission
            if target_frame is not None:
                self.target_frame = target_frame
            if href is not None:
                self.href = href

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDefBool(
        "default_button", "form:default-button", False
    ),
    PropDef("repeat", "form:repeat"),
    PropDefBool("disabled", "form:disabled", False),
    PropDef("focus_on_click", "form:focus-on-click"),
    PropDef("image_data", "form:image-data"),
    PropDef("label", "form:label"),
    PropDefBool("toggle", "form:toggle", False),
    PropDef("value", "form:value"),
    PropDef("href", "xlink:href"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("xforms_submission", "form:xforms-submission"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:button'

button_type instance-attribute

button_type = button_type

default_button instance-attribute

default_button = default_button

delay_for_repeat instance-attribute

delay_for_repeat = delay_for_repeat

focus_on_click instance-attribute

focus_on_click = focus_on_click

href instance-attribute

href = href

image_align instance-attribute

image_align = image_align

image_data instance-attribute

image_data = image_data

image_position instance-attribute

image_position = image_position

label instance-attribute

label = label

repeat instance-attribute

repeat = repeat

target_frame instance-attribute

target_frame = target_frame

toggle instance-attribute

toggle = toggle

value instance-attribute

value = value

xforms_submission instance-attribute

xforms_submission = xforms_submission

__init__

__init__(
    name: str | None = None,
    title: str | None = None,
    label: str | None = None,
    button_type: str | None = None,
    default_button: bool | None = None,
    control_implementation: str | None = None,
    repeat: bool | None = None,
    delay_for_repeat: str | None = None,
    disabled: bool | None = None,
    focus_on_click: bool | None = None,
    image_align: str | None = None,
    image_position: str | None = None,
    image_data: str | None = None,
    value: str | None = None,
    toggle: bool | None = None,
    target_frame: str | None = None,
    href: str | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    xforms_submission: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormButton, “form:button”.

The “form:button” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip of the control.

None
disabled bool | None

If True, the control is disabled.

None
printable bool | None

If True, the control is printable.

None
repeat bool | None

If True, the control repeats when a button is clicked.

None
delay_for_repeat str | None

The delay for repeating the action. Defaults to “PT0.050S”.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

If True, the control is a tab stop.

None
button_type str | None

The type of the button.

None
default_button bool | None

If True, this is the default button.

None
focus_on_click bool | None

If True, the button gets the focus when clicked.

None
image_align str | None

The alignment of the image.

None
image_data str | None

The image data for the button.

None
image_position str | None

The position of the image.

None
label str | None

The label of the button.

None
toggle bool | None

If True, the button is a toggle button.

None
target_frame str | None

The target frame for the URL.

None
href str | None

The URL to navigate to when the button is clicked.

None
xml_id str | None

The unique XML ID.

None
xforms_submission str | None

The XForms submission to use.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
def __init__(
    self,
    name: str | None = None,
    title: str | None = None,
    label: str | None = None,
    button_type: str | None = None,
    default_button: bool | None = None,
    control_implementation: str | None = None,
    repeat: bool | None = None,
    delay_for_repeat: str | None = None,
    disabled: bool | None = None,
    focus_on_click: bool | None = None,
    image_align: str | None = None,
    image_position: str | None = None,
    image_data: str | None = None,
    value: str | None = None,
    toggle: bool | None = None,
    target_frame: str | None = None,
    href: str | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    xforms_submission: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormButton, "form:button".

    The "form:button" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        title: The title or tooltip of the control.
        disabled: If True, the control is disabled.
        printable: If True, the control is printable.
        repeat: If True, the control repeats when a button is clicked.
        delay_for_repeat: The delay for repeating the action. Defaults to "PT0.050S".
        tab_index: The tab order of the control.
        tab_stop: If True, the control is a tab stop.
        button_type: The type of the button.
        default_button: If True, this is the default button.
        focus_on_click: If True, the button gets the focus when clicked.
        image_align: The alignment of the image.
        image_data: The image data for the button.
        image_position: The position of the image.
        label: The label of the button.
        toggle: If True, the button is a toggle button.
        target_frame: The target frame for the URL.
        href: The URL to navigate to when the button is clicked.
        xml_id: The unique XML ID.
        xforms_submission: The XForms submission to use.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        disabled=disabled,
        printable=printable,
        title=title,
        tab_index=tab_index,
        tab_stop=tab_stop,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if value is not None:
            self.value = value
        if button_type is not None:
            self.button_type = button_type
        if default_button is not None:
            self.default_button = default_button
        if repeat is not None:
            self.repeat = repeat
        if delay_for_repeat is not None:
            self.delay_for_repeat = delay_for_repeat
        if focus_on_click is not None:
            self.focus_on_click = focus_on_click
        if image_align is not None:
            self.image_align = image_align
        if image_data is not None:
            self.image_data = image_data
        if image_position is not None:
            self.image_position = image_position
        if label is not None:
            self.label = label
        if toggle is not None:
            self.toggle = toggle
        if xforms_submission is not None:
            self.xforms_submission = xforms_submission
        if target_frame is not None:
            self.target_frame = target_frame
        if href is not None:
            self.href = href

FormCheckbox

Bases: FormImageAlignMixin, FormImagePositionMixin, FormGrid

An on/off control, “form:checkbox”.

The control is on when the value of the form:current-state attribute associated with the control element is checked.

Attributes:

Name Type Description
control_implementation str or None

The control implementation.

current_state str or None

The current state of the checkbox.

data_field str or None

The data field used for storing the value.

disabled bool

If True, the control is disabled.

id str or None

The unique XML ID (form:id).

image_align str or None

The alignment of the image.

image_position str or None

The position of the image.

is_tristate bool

If True, the checkbox can have three states.

label str or None

The label of the control.

linked_cell str or None

The linked spreadsheet cell.

name str or None

The name of the control.

printable bool

If True, the control is printable.

state str or None

The state of the checkbox.

tab_index int or None

The tab order of the control.

tab_stop bool

If True, the control is a tab stop.

title str or None

The title or tooltip of the control.

value str or None

The value of the control.

visual_effect str or None

The visual effect of the control.

xforms_bind str or None

The XForms bind expression.

xml_id str or None

The unique XML ID.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormCheckbox, “form:checkbox”.

Source code in odfdo/form_controls.py
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
class FormCheckbox(FormImageAlignMixin, FormImagePositionMixin, FormGrid):
    """An on/off control, "form:checkbox".

    The control is on when the value of the form:current-state attribute
    associated with the control element is checked.

    Attributes:
        control_implementation (str or None): The control implementation.
        current_state (str or None): The current state of the checkbox.
        data_field (str or None): The data field used for storing the value.
        disabled (bool): If True, the control is disabled.
        id (str or None): The unique XML ID (form:id).
        image_align (str or None): The alignment of the image.
        image_position (str or None): The position of the image.
        is_tristate (bool): If True, the checkbox can have three states.
        label (str or None): The label of the control.
        linked_cell (str or None): The linked spreadsheet cell.
        name (str or None): The name of the control.
        printable (bool): If True, the control is printable.
        state (str or None): The state of the checkbox.
        tab_index (int or None): The tab order of the control.
        tab_stop (bool): If True, the control is a tab stop.
        title (str or None): The title or tooltip of the control.
        value (str or None): The value of the control.
        visual_effect (str or None): The visual effect of the control.
        xforms_bind (str or None): The XForms bind expression.
        xml_id (str or None): The unique XML ID.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:checkbox"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("current_state", "form:current-state"),
        PropDef("data_field", "form:data-field"),
        PropDefBool("disabled", "form:disabled", False),
        PropDef("image_align", "form:image-align"),
        PropDef("image_position", "form:image-position"),
        PropDefBool("is_tristate", "form:is-tristate", False),
        PropDef("label", "form:label"),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("name", "form:name"),
        PropDefBool("printable", "form:printable", True),
        PropDef("state", "form:state"),
        PropDef("tab_index", "form:tab-index"),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDef("title", "form:title"),
        PropDef("value", "form:value"),
        PropDef("visual_effect", "form:visual-effect"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("xml_id", "xml:id"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        title: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        current_state: str | None = None,
        data_field: str | None = None,
        disabled: bool | None = None,
        image_align: str | None = None,
        image_position: str | None = None,
        is_tristate: bool | None = None,
        label: str | None = None,
        linked_cell: str | None = None,
        printable: bool | None = None,
        state: str | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        visual_effect: str | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormCheckbox, "form:checkbox".

        The "form:checkbox" element is usable within the following elements:
        "form:column" and "form:form".

        Args:
            name: The name of the control.
            title: The title or tooltip of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            current_state: The current state of the checkbox.
            data_field: The data field used for storing the value.
            disabled: If True, the control is disabled.
            image_align: The alignment of the image.
            image_position: The position of the image.
            is_tristate: If True, the checkbox can have three states.
            label: The label of the control.
            linked_cell: The linked spreadsheet cell.
            printable: If True, the control is printable.
            state: The state of the checkbox.
            tab_index: The tab order of the control.
            tab_stop: If True, the control is a tab stop.
            visual_effect: The visual effect of the control.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            disabled=disabled,
            printable=printable,
            title=title,
            tab_index=tab_index,
            tab_stop=tab_stop,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if current_state is not None:
                self.current_state = current_state
            if data_field is not None:
                self.data_field = data_field
            if image_align is not None:
                self.image_align = image_align
            if image_position is not None:
                self.image_position = image_position
            if is_tristate is not None:
                self.is_tristate = is_tristate
            if label is not None:
                self.label = label
            if linked_cell is not None:
                self.linked_cell = linked_cell
            if state is not None:
                self.state = state
            if value is not None:
                self.value = value
            if visual_effect is not None:
                self.visual_effect = visual_effect

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("current_state", "form:current-state"),
    PropDef("data_field", "form:data-field"),
    PropDefBool("disabled", "form:disabled", False),
    PropDef("image_align", "form:image-align"),
    PropDef("image_position", "form:image-position"),
    PropDefBool("is_tristate", "form:is-tristate", False),
    PropDef("label", "form:label"),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("name", "form:name"),
    PropDefBool("printable", "form:printable", True),
    PropDef("state", "form:state"),
    PropDef("tab_index", "form:tab-index"),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDef("title", "form:title"),
    PropDef("value", "form:value"),
    PropDef("visual_effect", "form:visual-effect"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("xml_id", "xml:id"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:checkbox'

current_state instance-attribute

current_state = current_state

data_field instance-attribute

data_field = data_field

image_align instance-attribute

image_align = image_align

image_position instance-attribute

image_position = image_position

is_tristate instance-attribute

is_tristate = is_tristate

label instance-attribute

label = label

linked_cell instance-attribute

linked_cell = linked_cell

state instance-attribute

state = state

value instance-attribute

value = value

visual_effect instance-attribute

visual_effect = visual_effect

__init__

__init__(
    name: str | None = None,
    title: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    current_state: str | None = None,
    data_field: str | None = None,
    disabled: bool | None = None,
    image_align: str | None = None,
    image_position: str | None = None,
    is_tristate: bool | None = None,
    label: str | None = None,
    linked_cell: str | None = None,
    printable: bool | None = None,
    state: str | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    visual_effect: str | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormCheckbox, “form:checkbox”.

The “form:checkbox” element is usable within the following elements: “form:column” and “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
title str | None

The title or tooltip of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
current_state str | None

The current state of the checkbox.

None
data_field str | None

The data field used for storing the value.

None
disabled bool | None

If True, the control is disabled.

None
image_align str | None

The alignment of the image.

None
image_position str | None

The position of the image.

None
is_tristate bool | None

If True, the checkbox can have three states.

None
label str | None

The label of the control.

None
linked_cell str | None

The linked spreadsheet cell.

None
printable bool | None

If True, the control is printable.

None
state str | None

The state of the checkbox.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

If True, the control is a tab stop.

None
visual_effect str | None

The visual effect of the control.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
def __init__(
    self,
    name: str | None = None,
    title: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    current_state: str | None = None,
    data_field: str | None = None,
    disabled: bool | None = None,
    image_align: str | None = None,
    image_position: str | None = None,
    is_tristate: bool | None = None,
    label: str | None = None,
    linked_cell: str | None = None,
    printable: bool | None = None,
    state: str | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    visual_effect: str | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormCheckbox, "form:checkbox".

    The "form:checkbox" element is usable within the following elements:
    "form:column" and "form:form".

    Args:
        name: The name of the control.
        title: The title or tooltip of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        current_state: The current state of the checkbox.
        data_field: The data field used for storing the value.
        disabled: If True, the control is disabled.
        image_align: The alignment of the image.
        image_position: The position of the image.
        is_tristate: If True, the checkbox can have three states.
        label: The label of the control.
        linked_cell: The linked spreadsheet cell.
        printable: If True, the control is printable.
        state: The state of the checkbox.
        tab_index: The tab order of the control.
        tab_stop: If True, the control is a tab stop.
        visual_effect: The visual effect of the control.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        disabled=disabled,
        printable=printable,
        title=title,
        tab_index=tab_index,
        tab_stop=tab_stop,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if current_state is not None:
            self.current_state = current_state
        if data_field is not None:
            self.data_field = data_field
        if image_align is not None:
            self.image_align = image_align
        if image_position is not None:
            self.image_position = image_position
        if is_tristate is not None:
            self.is_tristate = is_tristate
        if label is not None:
            self.label = label
        if linked_cell is not None:
            self.linked_cell = linked_cell
        if state is not None:
            self.state = state
        if value is not None:
            self.value = value
        if visual_effect is not None:
            self.visual_effect = visual_effect

FormColumn

Bases: Element

A column in a form grid control, “form:column”.

Attributes:

Name Type Description
name str or None

The name of the column (form:name).

control_implementation str or None

The control implementation.

label str or None

The label of the column.

text_style_name str or None

The text style name (form:text-style-name).

Methods:

Name Description
__init__

Create a FormColumn, “form:column”.

__repr__
Source code in odfdo/form_controls.py
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
class FormColumn(Element):
    """A column in a form grid control, "form:column".

    Attributes:
        name (str or None): The name of the column (form:name).
        control_implementation (str or None): The control implementation.
        label (str or None): The label of the column.
        text_style_name (str or None): The text style name (form:text-style-name).
    """

    _tag = "form:column"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("label", "form:label"),
        PropDef("text_style_name", "form:text-style-name"),
    )

    def __init__(
        self,
        name: str | None = None,
        control_implementation: str | None = None,
        label: str | None = None,
        text_style_name: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormColumn, "form:column".

        The "form:column" element is usable within the following element:
        "form:grid".

        Args:
            name: The name of the column.
            control_implementation: The control implementation.
            label: The label of the column.
            text_style_name: The text style name.
        """
        super().__init__(**kwargs)
        if self._do_init:
            if name is not None:
                self.name = name
            if control_implementation is not None:
                self.control_implementation = control_implementation
            if label is not None:
                self.label = label
            if text_style_name is not None:
                self.text_style_name = text_style_name

    def __repr__(self) -> str:
        return f"<{self.__class__.__name__} name={self.name}>"

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("label", "form:label"),
    PropDef("text_style_name", "form:text-style-name"),
)

_tag class-attribute instance-attribute

_tag = 'form:column'

control_implementation instance-attribute

control_implementation = control_implementation

label instance-attribute

label = label

name instance-attribute

name = name

text_style_name instance-attribute

text_style_name = text_style_name

__init__

__init__(
    name: str | None = None,
    control_implementation: str | None = None,
    label: str | None = None,
    text_style_name: str | None = None,
    **kwargs: Any,
) -> None

Create a FormColumn, “form:column”.

The “form:column” element is usable within the following element: “form:grid”.

Parameters:

Name Type Description Default
name str | None

The name of the column.

None
control_implementation str | None

The control implementation.

None
label str | None

The label of the column.

None
text_style_name str | None

The text style name.

None
Source code in odfdo/form_controls.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
def __init__(
    self,
    name: str | None = None,
    control_implementation: str | None = None,
    label: str | None = None,
    text_style_name: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormColumn, "form:column".

    The "form:column" element is usable within the following element:
    "form:grid".

    Args:
        name: The name of the column.
        control_implementation: The control implementation.
        label: The label of the column.
        text_style_name: The text style name.
    """
    super().__init__(**kwargs)
    if self._do_init:
        if name is not None:
            self.name = name
        if control_implementation is not None:
            self.control_implementation = control_implementation
        if label is not None:
            self.label = label
        if text_style_name is not None:
            self.text_style_name = text_style_name

__repr__

__repr__() -> str
Source code in odfdo/form_controls.py
92
93
def __repr__(self) -> str:
    return f"<{self.__class__.__name__} name={self.name}>"

FormCombobox

Bases: FormSourceListMixin, FormSizetMixin, FormText

A control which allows displaying and editing of text, and contains a list of possible values for that text, “form:combobox”.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

value str or None

The value of the control (form:value).

control_implementation str or None

The control implementation (form:control-implementation).

title str or None

The title or tooltip of the control (form:title).

disabled bool

Specifies if the control is disabled (form:disabled).

printable bool

Specifies if the control is printable (form:printable).

auto_complete str or None

Specifies if auto-completion is enabled (form:auto-complete).

dropdown bool

Specifies if the combobox has a dropdown list (form:dropdown).

list_source str or None

The source of the list (form:list-source).

source_cell_range str or None

The cell range for the list source (form:source-cell-range).

tab_stop bool

Specifies if the control is a tab stop (form:tab-stop).

readonly bool

Specifies if the control is read-only (form:readonly).

convert_empty_to_null bool

Specifies if an empty value is converted to null (form:convert-empty-to-null).

current_value str or None

The current value of the control (form:current-value).

data_field str or None

The data field used for storing the value (form:data-field).

linked_cell str or None

The linked spreadsheet cell (form:linked-cell).

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression (xforms:bind).

form_id str or None

The form ID (deprecated, form:id).

size int or None

The number of visible items in the control (form:size).

max_length int or None

The maximum number of characters allowed (form:max-length).

list_source_type str or None

The type of the list source.

Methods:

Name Description
__init__

Create a FormCombobox, “form:combobox”.

Source code in odfdo/form_controls.py
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
class FormCombobox(FormSourceListMixin, FormSizetMixin, FormText):
    """A control which allows displaying and editing of text, and contains
    a list of possible values for that text, "form:combobox".

    Attributes:
        name (str or None): The name of the control (form:name).
        value (str or None): The value of the control (form:value).
        control_implementation (str or None): The control implementation (form:control-implementation).
        title (str or None): The title or tooltip of the control (form:title).
        disabled (bool): Specifies if the control is disabled (form:disabled).
        printable (bool): Specifies if the control is printable (form:printable).
        auto_complete (str or None): Specifies if auto-completion is enabled (form:auto-complete).
        dropdown (bool): Specifies if the combobox has a dropdown list (form:dropdown).
        list_source (str or None): The source of the list (form:list-source).
        source_cell_range (str or None): The cell range for the list source (form:source-cell-range).
        tab_stop (bool): Specifies if the control is a tab stop (form:tab-stop).
        readonly (bool): Specifies if the control is read-only (form:readonly).
        convert_empty_to_null (bool): Specifies if an empty value is converted to null (form:convert-empty-to-null).
        current_value (str or None): The current value of the control (form:current-value).
        data_field (str or None): The data field used for storing the value (form:data-field).
        linked_cell (str or None): The linked spreadsheet cell (form:linked-cell).
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression (xforms:bind).
        form_id (str or None): The form ID (deprecated, form:id).
        size (int or None): The number of visible items in the control (form:size).
        max_length (int or None): The maximum number of characters allowed (form:max-length).
        list_source_type (str or None): The type of the list source.
    """

    _tag = "form:combobox"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("value", "form:value"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDef("auto_complete", "form:auto-complete"),
        PropDefBool("dropdown", "form:dropdown", False),
        PropDef("list_source", "form:list-source"),
        PropDef("source_cell_range", "form:source-cell-range"),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDefBool("readonly", "form:readonly", False),
        PropDefBool("convert_empty_to_null", "form:convert-empty-to-null", False),
        PropDef("current_value", "form:current-value"),
        PropDef("data_field", "form:data-field"),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        title: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        auto_complete: bool | None = None,
        dropdown: bool | None = None,
        list_source: str | None = None,
        list_source_type: str | None = None,
        source_cell_range: str | None = None,
        size: int | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        readonly: bool | None = None,
        convert_empty_to_null: bool | None = None,
        current_value: str | None = None,
        data_field: str | None = None,
        linked_cell: str | None = None,
        max_length: int | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormCombobox, "form:combobox".

        The "form:combobox" element is usable within the following elements:
        "form:column" and "form:form".

        Args:
            name: The name of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            title: The title or tooltip of the control.
            disabled: If True, the control is disabled.
            printable: If True, the control is printable.
            auto_complete: If True, auto-complete is enabled.
            dropdown: If True, the combobox is a dropdown.
            list_source: The source of the list.
            list_source_type: The type of the list source.
            source_cell_range: The cell range for the list source.
            size: The size of the combobox.
            tab_index: The tab order of the control.
            tab_stop: If True, the control is a tab stop.
            readonly: If True, the control is read-only.
            convert_empty_to_null: If True, an empty value is converted to null.
            current_value: The current value of the control.
            data_field: The data field for storing the value.
            linked_cell: The linked spreadsheet cell.
            max_length: The maximum number of characters allowed.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            value=value,
            control_implementation=control_implementation,
            title=title,
            disabled=disabled,
            printable=printable,
            tab_index=tab_index,
            tab_stop=tab_stop,
            readonly=readonly,
            convert_empty_to_null=convert_empty_to_null,
            current_value=current_value,
            data_field=data_field,
            linked_cell=linked_cell,
            max_length=max_length,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if auto_complete is not None:
                self.auto_complete = auto_complete
            if dropdown is not None:
                self.dropdown = dropdown
            if list_source is not None:
                self.list_source = list_source
            if list_source_type is not None:
                self.list_source_type = list_source_type
            if source_cell_range is not None:
                self.source_cell_range = source_cell_range
            if size is not None:
                self.size = size

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef("value", "form:value"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDef("auto_complete", "form:auto-complete"),
    PropDefBool("dropdown", "form:dropdown", False),
    PropDef("list_source", "form:list-source"),
    PropDef("source_cell_range", "form:source-cell-range"),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDefBool("readonly", "form:readonly", False),
    PropDefBool(
        "convert_empty_to_null",
        "form:convert-empty-to-null",
        False,
    ),
    PropDef("current_value", "form:current-value"),
    PropDef("data_field", "form:data-field"),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:combobox'

auto_complete instance-attribute

auto_complete = auto_complete

dropdown instance-attribute

dropdown = dropdown

list_source instance-attribute

list_source = list_source

list_source_type instance-attribute

list_source_type = list_source_type

size instance-attribute

size = size

source_cell_range instance-attribute

source_cell_range = source_cell_range

__init__

__init__(
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    auto_complete: bool | None = None,
    dropdown: bool | None = None,
    list_source: str | None = None,
    list_source_type: str | None = None,
    source_cell_range: str | None = None,
    size: int | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormCombobox, “form:combobox”.

The “form:combobox” element is usable within the following elements: “form:column” and “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip of the control.

None
disabled bool | None

If True, the control is disabled.

None
printable bool | None

If True, the control is printable.

None
auto_complete bool | None

If True, auto-complete is enabled.

None
dropdown bool | None

If True, the combobox is a dropdown.

None
list_source str | None

The source of the list.

None
list_source_type str | None

The type of the list source.

None
source_cell_range str | None

The cell range for the list source.

None
size int | None

The size of the combobox.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

If True, the control is a tab stop.

None
readonly bool | None

If True, the control is read-only.

None
convert_empty_to_null bool | None

If True, an empty value is converted to null.

None
current_value str | None

The current value of the control.

None
data_field str | None

The data field for storing the value.

None
linked_cell str | None

The linked spreadsheet cell.

None
max_length int | None

The maximum number of characters allowed.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
def __init__(
    self,
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    auto_complete: bool | None = None,
    dropdown: bool | None = None,
    list_source: str | None = None,
    list_source_type: str | None = None,
    source_cell_range: str | None = None,
    size: int | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormCombobox, "form:combobox".

    The "form:combobox" element is usable within the following elements:
    "form:column" and "form:form".

    Args:
        name: The name of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        title: The title or tooltip of the control.
        disabled: If True, the control is disabled.
        printable: If True, the control is printable.
        auto_complete: If True, auto-complete is enabled.
        dropdown: If True, the combobox is a dropdown.
        list_source: The source of the list.
        list_source_type: The type of the list source.
        source_cell_range: The cell range for the list source.
        size: The size of the combobox.
        tab_index: The tab order of the control.
        tab_stop: If True, the control is a tab stop.
        readonly: If True, the control is read-only.
        convert_empty_to_null: If True, an empty value is converted to null.
        current_value: The current value of the control.
        data_field: The data field for storing the value.
        linked_cell: The linked spreadsheet cell.
        max_length: The maximum number of characters allowed.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        value=value,
        control_implementation=control_implementation,
        title=title,
        disabled=disabled,
        printable=printable,
        tab_index=tab_index,
        tab_stop=tab_stop,
        readonly=readonly,
        convert_empty_to_null=convert_empty_to_null,
        current_value=current_value,
        data_field=data_field,
        linked_cell=linked_cell,
        max_length=max_length,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if auto_complete is not None:
            self.auto_complete = auto_complete
        if dropdown is not None:
            self.dropdown = dropdown
        if list_source is not None:
            self.list_source = list_source
        if list_source_type is not None:
            self.list_source_type = list_source_type
        if source_cell_range is not None:
            self.source_cell_range = source_cell_range
        if size is not None:
            self.size = size

FormDate

Bases: FormDelayRepeatMixin, FormText

A control for inputting date data, “form:date”.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

value str or None

The value of the control (form:value).

control_implementation str or None

The control implementation (form:control-implementation).

title str or None

The title or tooltip of the control (form:title).

disabled bool

Specifies if the control is disabled (form:disabled).

printable bool

Specifies if the control is printable (form:printable).

tab_stop bool

Specifies if the control is a tab stop (form:tab-stop).

readonly bool

Specifies if the control is read-only (form:readonly).

convert_empty_to_null bool

Specifies if an empty value is converted to null (form:convert-empty-to-null).

current_value str or None

The current value of the control (form:current-value).

data_field str or None

The data field used for storing the value (form:data-field).

repeat bool or None

Specifies if the control repeats when a button is clicked (form:repeat).

linked_cell str or None

The linked spreadsheet cell (form:linked-cell).

min_value str or None

The minimum date value allowed (form:min-value).

max_value str or None

The maximum date value allowed (form:max-value).

spin_button bool

Specifies if a spin button is available (form:spin-button).

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression (xforms:bind).

form_id str or None

The form ID (deprecated, form:id).

tab_index int or None

The tab order of the control (form:tab-index).

max_length int or None

The maximum number of characters allowed (form:max-length).

delay_for_repeat str or None

The delay for repeating the action (form:delay-for-repeat).

Methods:

Name Description
__init__

Create a FormDate, “form:date”.

Source code in odfdo/form_controls.py
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
class FormDate(FormDelayRepeatMixin, FormText):
    """A control for inputting date data, "form:date".

    Attributes:
        name (str or None): The name of the control (form:name).
        value (str or None): The value of the control (form:value).
        control_implementation (str or None): The control implementation (form:control-implementation).
        title (str or None): The title or tooltip of the control (form:title).
        disabled (bool): Specifies if the control is disabled (form:disabled).
        printable (bool): Specifies if the control is printable (form:printable).
        tab_stop (bool): Specifies if the control is a tab stop (form:tab-stop).
        readonly (bool): Specifies if the control is read-only (form:readonly).
        convert_empty_to_null (bool): Specifies if an empty value is converted to null (form:convert-empty-to-null).
        current_value (str or None): The current value of the control (form:current-value).
        data_field (str or None): The data field used for storing the value (form:data-field).
        repeat (bool or None): Specifies if the control repeats when a button is clicked (form:repeat).
        linked_cell (str or None): The linked spreadsheet cell (form:linked-cell).
        min_value (str or None): The minimum date value allowed (form:min-value).
        max_value (str or None): The maximum date value allowed (form:max-value).
        spin_button (bool): Specifies if a spin button is available (form:spin-button).
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression (xforms:bind).
        form_id (str or None): The form ID (deprecated, form:id).
        tab_index (int or None): The tab order of the control (form:tab-index).
        max_length (int or None): The maximum number of characters allowed (form:max-length).
        delay_for_repeat (str or None): The delay for repeating the action (form:delay-for-repeat).
    """

    _tag = "form:date"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("value", "form:value"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDefBool("readonly", "form:readonly", False),
        PropDefBool("convert_empty_to_null", "form:convert-empty-to-null", False),
        PropDef("current_value", "form:current-value"),
        PropDef("data_field", "form:data-field"),
        PropDef("repeat", "form:repeat"),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("min_value", "form:min-value"),
        PropDef("max_value", "form:max-value"),
        PropDefBool("spin_button", "form:spin-button", False),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        title: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        readonly: bool | None = None,
        convert_empty_to_null: bool | None = None,
        current_value: str | None = None,
        data_field: str | None = None,
        repeat: bool | None = None,
        delay_for_repeat: str | None = None,
        linked_cell: str | None = None,
        max_length: int | None = None,
        min_value: str | None = None,
        max_value: str | None = None,
        spin_button: bool | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormDate, "form:date".

        The "form:date" element is usable within the following elements:
        "form:column" and "form:form".

        Args:
            name: The name of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            title: The title or tooltip of the control.
            disabled: If True, the control is disabled.
            printable: If True, the control is printable.
            tab_index: The tab order of the control.
            tab_stop: If True, the control is a tab stop.
            readonly: If True, the control is read-only.
            convert_empty_to_null: If True, an empty value is converted to null.
            current_value: The current value of the control.
            data_field: The data field for storing the value.
            repeat: If True, the control repeats when a button is clicked.
            delay_for_repeat: The delay for repeating the action. Defaults to "PT0.050S".
            linked_cell: The linked spreadsheet cell.
            max_length: The maximum number of characters allowed.
            min_value: The minimum value allowed.
            max_value: The maximum value allowed.
            spin_button: If True, a spin button is available.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            title=title,
            value=value,
            disabled=disabled,
            printable=printable,
            readonly=readonly,
            convert_empty_to_null=convert_empty_to_null,
            current_value=current_value,
            data_field=data_field,
            linked_cell=linked_cell,
            tab_index=tab_index,
            tab_stop=tab_stop,
            max_length=max_length,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if repeat is not None:
                self.repeat = repeat
            if delay_for_repeat is not None:
                self.delay_for_repeat = delay_for_repeat
            if min_value is not None:
                self.min_value = min_value
            if max_value is not None:
                self.max_value = max_value
            if spin_button is not None:
                self.spin_button = spin_button

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef("value", "form:value"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDefBool("readonly", "form:readonly", False),
    PropDefBool(
        "convert_empty_to_null",
        "form:convert-empty-to-null",
        False,
    ),
    PropDef("current_value", "form:current-value"),
    PropDef("data_field", "form:data-field"),
    PropDef("repeat", "form:repeat"),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("min_value", "form:min-value"),
    PropDef("max_value", "form:max-value"),
    PropDefBool("spin_button", "form:spin-button", False),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:date'

delay_for_repeat instance-attribute

delay_for_repeat = delay_for_repeat

max_value instance-attribute

max_value = max_value

min_value instance-attribute

min_value = min_value

repeat instance-attribute

repeat = repeat

spin_button instance-attribute

spin_button = spin_button

__init__

__init__(
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    repeat: bool | None = None,
    delay_for_repeat: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    min_value: str | None = None,
    max_value: str | None = None,
    spin_button: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormDate, “form:date”.

The “form:date” element is usable within the following elements: “form:column” and “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip of the control.

None
disabled bool | None

If True, the control is disabled.

None
printable bool | None

If True, the control is printable.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

If True, the control is a tab stop.

None
readonly bool | None

If True, the control is read-only.

None
convert_empty_to_null bool | None

If True, an empty value is converted to null.

None
current_value str | None

The current value of the control.

None
data_field str | None

The data field for storing the value.

None
repeat bool | None

If True, the control repeats when a button is clicked.

None
delay_for_repeat str | None

The delay for repeating the action. Defaults to “PT0.050S”.

None
linked_cell str | None

The linked spreadsheet cell.

None
max_length int | None

The maximum number of characters allowed.

None
min_value str | None

The minimum value allowed.

None
max_value str | None

The maximum value allowed.

None
spin_button bool | None

If True, a spin button is available.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
def __init__(
    self,
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    repeat: bool | None = None,
    delay_for_repeat: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    min_value: str | None = None,
    max_value: str | None = None,
    spin_button: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormDate, "form:date".

    The "form:date" element is usable within the following elements:
    "form:column" and "form:form".

    Args:
        name: The name of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        title: The title or tooltip of the control.
        disabled: If True, the control is disabled.
        printable: If True, the control is printable.
        tab_index: The tab order of the control.
        tab_stop: If True, the control is a tab stop.
        readonly: If True, the control is read-only.
        convert_empty_to_null: If True, an empty value is converted to null.
        current_value: The current value of the control.
        data_field: The data field for storing the value.
        repeat: If True, the control repeats when a button is clicked.
        delay_for_repeat: The delay for repeating the action. Defaults to "PT0.050S".
        linked_cell: The linked spreadsheet cell.
        max_length: The maximum number of characters allowed.
        min_value: The minimum value allowed.
        max_value: The maximum value allowed.
        spin_button: If True, a spin button is available.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        title=title,
        value=value,
        disabled=disabled,
        printable=printable,
        readonly=readonly,
        convert_empty_to_null=convert_empty_to_null,
        current_value=current_value,
        data_field=data_field,
        linked_cell=linked_cell,
        tab_index=tab_index,
        tab_stop=tab_stop,
        max_length=max_length,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if repeat is not None:
            self.repeat = repeat
        if delay_for_repeat is not None:
            self.delay_for_repeat = delay_for_repeat
        if min_value is not None:
            self.min_value = min_value
        if max_value is not None:
            self.max_value = max_value
        if spin_button is not None:
            self.spin_button = spin_button

FormFile

Bases: FormAsDictMixin, FormMaxLengthMixin, FormGrid

A control for or selecting a file, “form:file”.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

value str or None

The value of the control.

control_implementation str or None

The control implementation.

title str or None

The title or tooltip of the control.

disabled bool

Specifies if the control is disabled (form:disabled). Default is False.

printable bool

Specifies if the control is printable (form:printable). Default is True.

tab_stop bool

Specifies if the control is a tab stop (form:tab-stop). Default is True.

tab_index int or None

The tab order of the control (form:tab-index). Default is 0.

readonly bool

Specifies if the control is read-only (form:readonly). Default is False.

current_value str or None

The current value of the control (form:current-value).

linked_cell str or None

The linked spreadsheet cell.

max_length int or None

The maximum number of characters allowed (form:max-length).

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormFile, “form:file”.

__str__
Source code in odfdo/form_controls.py
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
class FormFile(FormAsDictMixin, FormMaxLengthMixin, FormGrid):
    """A control for or selecting a file, "form:file".

    Attributes:
        name (str or None): The name of the control (form:name).
        value (str or None): The value of the control.
        control_implementation (str or None): The control implementation.
        title (str or None): The title or tooltip of the control.
        disabled (bool): Specifies if the control is disabled (form:disabled). Default is False.
        printable (bool): Specifies if the control is printable (form:printable). Default is True.
        tab_stop (bool): Specifies if the control is a tab stop (form:tab-stop). Default is True.
        tab_index (int or None): The tab order of the control (form:tab-index). Default is 0.
        readonly (bool): Specifies if the control is read-only (form:readonly). Default is False.
        current_value (str or None): The current value of the control (form:current-value).
        linked_cell (str or None): The linked spreadsheet cell.
        max_length (int or None): The maximum number of characters allowed (form:max-length).
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:file"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("value", "form:value"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDefBool("readonly", "form:readonly", False),
        PropDef("current_value", "form:current-value"),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        title: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        readonly: bool | None = None,
        current_value: str | None = None,
        linked_cell: str | None = None,
        max_length: int | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormFile, "form:file".

        The "form:file" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            title: The title or tooltip.
            disabled: Specifies if the control is disabled.
            printable: Specifies if the control is printable.
            tab_index: The tab order of the control.
            tab_stop: Specifies if the control is a tab stop.
            readonly: Specifies if the control is read-only.
            current_value: The current value of the control.
            linked_cell: The linked spreadsheet cell.
            max_length: The maximum number of characters allowed.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            title=title,
            disabled=disabled,
            printable=printable,
            tab_index=tab_index,
            tab_stop=tab_stop,
            max_length=max_length,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if value is not None:
                self.value = value
            if readonly is not None:
                self.readonly = readonly
            if current_value is not None:
                self.current_value = current_value
            if linked_cell is not None:
                self.linked_cell = linked_cell
            if max_length is not None:
                self.max_length = max_length

    def __str__(self) -> str:
        if self.current_value is not None:
            return self.current_value or ""
        return self.value or ""

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef("value", "form:value"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDefBool("readonly", "form:readonly", False),
    PropDef("current_value", "form:current-value"),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:file'

current_value instance-attribute

current_value = current_value

linked_cell instance-attribute

linked_cell = linked_cell

max_length instance-attribute

max_length = max_length

readonly instance-attribute

readonly = readonly

value instance-attribute

value = value

__init__

__init__(
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    current_value: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormFile, “form:file”.

The “form:file” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip.

None
disabled bool | None

Specifies if the control is disabled.

None
printable bool | None

Specifies if the control is printable.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

Specifies if the control is a tab stop.

None
readonly bool | None

Specifies if the control is read-only.

None
current_value str | None

The current value of the control.

None
linked_cell str | None

The linked spreadsheet cell.

None
max_length int | None

The maximum number of characters allowed.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
def __init__(
    self,
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    current_value: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormFile, "form:file".

    The "form:file" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        title: The title or tooltip.
        disabled: Specifies if the control is disabled.
        printable: Specifies if the control is printable.
        tab_index: The tab order of the control.
        tab_stop: Specifies if the control is a tab stop.
        readonly: Specifies if the control is read-only.
        current_value: The current value of the control.
        linked_cell: The linked spreadsheet cell.
        max_length: The maximum number of characters allowed.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        title=title,
        disabled=disabled,
        printable=printable,
        tab_index=tab_index,
        tab_stop=tab_stop,
        max_length=max_length,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if value is not None:
            self.value = value
        if readonly is not None:
            self.readonly = readonly
        if current_value is not None:
            self.current_value = current_value
        if linked_cell is not None:
            self.linked_cell = linked_cell
        if max_length is not None:
            self.max_length = max_length

__str__

__str__() -> str
Source code in odfdo/form_controls.py
785
786
787
788
def __str__(self) -> str:
    if self.current_value is not None:
        return self.current_value or ""
    return self.value or ""

FormFixedText

Bases: FormGenericControl

A control which attaches additional information to controls, or displays information, “form:fixed-text”

Only one label may be associated with a control.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

label str or None

The label of the control (form:label).

title str or None

The title or tooltip of the control (form:title).

form_for str or None

The ID of the control this label is for (form:for).

multi_line bool

Specifies if the label can have multiple lines (form:multi-line).

control_implementation str or None

The control implementation (form:control-implementation).

disabled bool

Specifies if the control is disabled (form:disabled).

printable bool

Specifies if the control is printable (form:printable).

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression (xforms:bind).

form_id str or None

The form ID (deprecated, form:id).

Methods:

Name Description
__init__

Create a FormFixedText, “form:fixed-text”.

Source code in odfdo/form_controls.py
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
class FormFixedText(FormGenericControl):
    """A control which attaches additional information to controls, or
    displays information, "form:fixed-text"

    Only one label may be associated with a control.

    Attributes:
        name (str or None): The name of the control (form:name).
        label (str or None): The label of the control (form:label).
        title (str or None): The title or tooltip of the control (form:title).
        form_for (str or None): The ID of the control this label is for (form:for).
        multi_line (bool): Specifies if the label can have multiple lines (form:multi-line).
        control_implementation (str or None): The control implementation (form:control-implementation).
        disabled (bool): Specifies if the control is disabled (form:disabled).
        printable (bool): Specifies if the control is printable (form:printable).
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression (xforms:bind).
        form_id (str or None): The form ID (deprecated, form:id).
    """

    _tag = "form:fixed-text"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("label", "form:label"),
        PropDef("title", "form:title"),
        PropDef("form_for", "form:for"),
        PropDefBool("multi_line", "form:multi-line", False),
        PropDef("control_implementation", "form:control-implementation"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        label: str | None = None,
        title: str | None = None,
        form_for: str | None = None,
        multi_line: bool | None = None,
        control_implementation: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormFixedText, "form:fixed-text".

        The "form:fixed-text" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            label: The label of the control.
            title: The title or tooltip of the control.
            form_for: The ID of the control this label is for.
            multi_line: If True, the label can have multiple lines.
            control_implementation: The control implementation.
            disabled: If True, the control is disabled.
            printable: If True, the control is printable.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if label is not None:
                self.label = label
            if title is not None:
                self.title = title
            if form_for is not None:
                self.form_for = form_for
            if multi_line is not None:
                self.multi_line = multi_line
            if disabled is not None:
                self.disabled = disabled
            if printable is not None:
                self.printable = printable

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef("label", "form:label"),
    PropDef("title", "form:title"),
    PropDef("form_for", "form:for"),
    PropDefBool("multi_line", "form:multi-line", False),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:fixed-text'

disabled instance-attribute

disabled = disabled

form_for instance-attribute

form_for = form_for

label instance-attribute

label = label

multi_line instance-attribute

multi_line = multi_line

printable instance-attribute

printable = printable

title instance-attribute

title = title

__init__

__init__(
    name: str | None = None,
    label: str | None = None,
    title: str | None = None,
    form_for: str | None = None,
    multi_line: bool | None = None,
    control_implementation: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormFixedText, “form:fixed-text”.

The “form:fixed-text” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
label str | None

The label of the control.

None
title str | None

The title or tooltip of the control.

None
form_for str | None

The ID of the control this label is for.

None
multi_line bool | None

If True, the label can have multiple lines.

None
control_implementation str | None

The control implementation.

None
disabled bool | None

If True, the control is disabled.

None
printable bool | None

If True, the control is printable.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
def __init__(
    self,
    name: str | None = None,
    label: str | None = None,
    title: str | None = None,
    form_for: str | None = None,
    multi_line: bool | None = None,
    control_implementation: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormFixedText, "form:fixed-text".

    The "form:fixed-text" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        label: The label of the control.
        title: The title or tooltip of the control.
        form_for: The ID of the control this label is for.
        multi_line: If True, the label can have multiple lines.
        control_implementation: The control implementation.
        disabled: If True, the control is disabled.
        printable: If True, the control is printable.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if label is not None:
            self.label = label
        if title is not None:
            self.title = title
        if form_for is not None:
            self.form_for = form_for
        if multi_line is not None:
            self.multi_line = multi_line
        if disabled is not None:
            self.disabled = disabled
        if printable is not None:
            self.printable = printable

FormFormattedText

Bases: FormDelayRepeatMixin, FormText

A control for inputting text, which follows the format defined by a data style that is assigned to the control’s graphical shape, “form:formatted-text”

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

value str or None

The value of the control.

control_implementation str or None

The control implementation.

title str or None

The title or tooltip of the control.

disabled bool

Specifies if the control is disabled (form:disabled). Default is False.

printable bool

Specifies if the control is printable (form:printable). Default is True.

tab_stop bool

Specifies if the control is a tab stop (form:tab-stop). Default is True.

tab_index int or None

The tab order of the control (form:tab-index). Default is 0.

readonly bool

Specifies if the control is read-only (form:readonly). Default is False.

convert_empty_to_null bool

Specifies if an empty value is converted to null (form:convert-empty-to-null). Default is False.

current_value str or None

The current value of the control (form:current-value).

data_field str or None

The data field used for storing the value.

repeat bool or None

Specifies if the control repeats when a button is clicked (form:repeat).

delay_for_repeat str or None

The delay for repeating the action (form:delay-for-repeat).

linked_cell str or None

The linked spreadsheet cell.

max_length int or None

The maximum number of characters allowed (form:max-length).

min_value str or None

The minimum numeric value allowed (form:min-value).

max_value str or None

The maximum numeric value allowed (form:max-value).

spin_button bool

Specifies if a spin button is available (form:spin-button). Default is False.

validation bool

Specifies if the control performs validation (form:validation). Default is False.

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormFormattedText, “form:formatted-text”.

Source code in odfdo/form_controls.py
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
class FormFormattedText(FormDelayRepeatMixin, FormText):
    """A control for inputting text, which follows the format defined by a
    data style that is assigned to the control's graphical shape,
    "form:formatted-text"

    Attributes:
        name (str or None): The name of the control (form:name).
        value (str or None): The value of the control.
        control_implementation (str or None): The control implementation.
        title (str or None): The title or tooltip of the control.
        disabled (bool): Specifies if the control is disabled (form:disabled). Default is False.
        printable (bool): Specifies if the control is printable (form:printable). Default is True.
        tab_stop (bool): Specifies if the control is a tab stop (form:tab-stop). Default is True.
        tab_index (int or None): The tab order of the control (form:tab-index). Default is 0.
        readonly (bool): Specifies if the control is read-only (form:readonly). Default is False.
        convert_empty_to_null (bool): Specifies if an empty value is converted to null (form:convert-empty-to-null). Default is False.
        current_value (str or None): The current value of the control (form:current-value).
        data_field (str or None): The data field used for storing the value.
        repeat (bool or None): Specifies if the control repeats when a button is clicked (form:repeat).
        delay_for_repeat (str or None): The delay for repeating the action (form:delay-for-repeat).
        linked_cell (str or None): The linked spreadsheet cell.
        max_length (int or None): The maximum number of characters allowed (form:max-length).
        min_value (str or None): The minimum numeric value allowed (form:min-value).
        max_value (str or None): The maximum numeric value allowed (form:max-value).
        spin_button (bool): Specifies if a spin button is available (form:spin-button). Default is False.
        validation (bool): Specifies if the control performs validation (form:validation). Default is False.
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:formatted-text"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("value", "form:value"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDefBool("readonly", "form:readonly", False),
        PropDefBool("convert_empty_to_null", "form:convert-empty-to-null", False),
        PropDef("current_value", "form:current-value"),
        PropDef("data_field", "form:data-field"),
        PropDef("repeat", "form:repeat"),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("min_value", "form:min-value"),
        PropDef("max_value", "form:max-value"),
        PropDefBool("spin_button", "form:spin-button", False),
        PropDefBool("validation", "form:validation", False),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        title: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        readonly: bool | None = None,
        convert_empty_to_null: bool | None = None,
        current_value: str | None = None,
        data_field: str | None = None,
        repeat: bool | None = None,
        delay_for_repeat: str | None = None,
        linked_cell: str | None = None,
        max_length: int | None = None,
        min_value: str | None = None,
        max_value: str | None = None,
        spin_button: bool | None = None,
        validation: bool | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormFormattedText, "form:formatted-text".

        The "form:formatted-text" element is usable within the following elements:
        "form:column" and "form:form".

        Args:
            name: The name of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            title: The title or tooltip.
            disabled: Specifies if the control is disabled.
            printable: Specifies if the control is printable.
            tab_index: The tab order of the control.
            tab_stop: Specifies if the control is a tab stop.
            readonly: Specifies if the control is read-only.
            convert_empty_to_null: Specifies if an empty value is converted to null.
            current_value: The current value of the control.
            data_field: The data field used for storing the value.
            repeat: Specifies if the control repeats when a button is clicked.
            delay_for_repeat: The delay for repeating the action.
            linked_cell: The linked spreadsheet cell.
            max_length: The maximum number of characters allowed.
            min_value: The minimum numeric value allowed.
            max_value: The maximum numeric value allowed.
            spin_button: Specifies if a spin button is available.
            validation: Specifies if the control performs validation.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            title=title,
            value=value,
            disabled=disabled,
            printable=printable,
            readonly=readonly,
            convert_empty_to_null=convert_empty_to_null,
            current_value=current_value,
            data_field=data_field,
            linked_cell=linked_cell,
            tab_index=tab_index,
            tab_stop=tab_stop,
            max_length=max_length,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if repeat is not None:
                self.repeat = repeat
            if delay_for_repeat is not None:
                self.delay_for_repeat = delay_for_repeat
            if min_value is not None:
                self.min_value = min_value
            if max_value is not None:
                self.max_value = max_value
            if spin_button is not None:
                self.spin_button = spin_button
            if validation is not None:
                self.validation = validation

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef("value", "form:value"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDefBool("readonly", "form:readonly", False),
    PropDefBool(
        "convert_empty_to_null",
        "form:convert-empty-to-null",
        False,
    ),
    PropDef("current_value", "form:current-value"),
    PropDef("data_field", "form:data-field"),
    PropDef("repeat", "form:repeat"),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("min_value", "form:min-value"),
    PropDef("max_value", "form:max-value"),
    PropDefBool("spin_button", "form:spin-button", False),
    PropDefBool("validation", "form:validation", False),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:formatted-text'

delay_for_repeat instance-attribute

delay_for_repeat = delay_for_repeat

max_value instance-attribute

max_value = max_value

min_value instance-attribute

min_value = min_value

repeat instance-attribute

repeat = repeat

spin_button instance-attribute

spin_button = spin_button

validation instance-attribute

validation = validation

__init__

__init__(
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    repeat: bool | None = None,
    delay_for_repeat: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    min_value: str | None = None,
    max_value: str | None = None,
    spin_button: bool | None = None,
    validation: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormFormattedText, “form:formatted-text”.

The “form:formatted-text” element is usable within the following elements: “form:column” and “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip.

None
disabled bool | None

Specifies if the control is disabled.

None
printable bool | None

Specifies if the control is printable.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

Specifies if the control is a tab stop.

None
readonly bool | None

Specifies if the control is read-only.

None
convert_empty_to_null bool | None

Specifies if an empty value is converted to null.

None
current_value str | None

The current value of the control.

None
data_field str | None

The data field used for storing the value.

None
repeat bool | None

Specifies if the control repeats when a button is clicked.

None
delay_for_repeat str | None

The delay for repeating the action.

None
linked_cell str | None

The linked spreadsheet cell.

None
max_length int | None

The maximum number of characters allowed.

None
min_value str | None

The minimum numeric value allowed.

None
max_value str | None

The maximum numeric value allowed.

None
spin_button bool | None

Specifies if a spin button is available.

None
validation bool | None

Specifies if the control performs validation.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
def __init__(
    self,
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    repeat: bool | None = None,
    delay_for_repeat: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    min_value: str | None = None,
    max_value: str | None = None,
    spin_button: bool | None = None,
    validation: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormFormattedText, "form:formatted-text".

    The "form:formatted-text" element is usable within the following elements:
    "form:column" and "form:form".

    Args:
        name: The name of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        title: The title or tooltip.
        disabled: Specifies if the control is disabled.
        printable: Specifies if the control is printable.
        tab_index: The tab order of the control.
        tab_stop: Specifies if the control is a tab stop.
        readonly: Specifies if the control is read-only.
        convert_empty_to_null: Specifies if an empty value is converted to null.
        current_value: The current value of the control.
        data_field: The data field used for storing the value.
        repeat: Specifies if the control repeats when a button is clicked.
        delay_for_repeat: The delay for repeating the action.
        linked_cell: The linked spreadsheet cell.
        max_length: The maximum number of characters allowed.
        min_value: The minimum numeric value allowed.
        max_value: The maximum numeric value allowed.
        spin_button: Specifies if a spin button is available.
        validation: Specifies if the control performs validation.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        title=title,
        value=value,
        disabled=disabled,
        printable=printable,
        readonly=readonly,
        convert_empty_to_null=convert_empty_to_null,
        current_value=current_value,
        data_field=data_field,
        linked_cell=linked_cell,
        tab_index=tab_index,
        tab_stop=tab_stop,
        max_length=max_length,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if repeat is not None:
            self.repeat = repeat
        if delay_for_repeat is not None:
            self.delay_for_repeat = delay_for_repeat
        if min_value is not None:
            self.min_value = min_value
        if max_value is not None:
            self.max_value = max_value
        if spin_button is not None:
            self.spin_button = spin_button
        if validation is not None:
            self.validation = validation

FormFrame

Bases: FormGenericControl

A frame in which controls may be visually arranged, “form:frame”.

Attributes:

Name Type Description
control_implementation str or None

The control implementation.

disabled bool

If True, the control is disabled.

form_for str or None

The ID of the control this frame is for.

id str or None

The unique XML ID (form:id).

label str or None

The label of the control.

name str or None

The name of the control.

printable bool

If True, the control is printable.

title str or None

The title or tooltip of the control.

xforms_bind str or None

The XForms bind expression.

xml_id str or None

The unique XML ID.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormFrame, “form:frame”.

Source code in odfdo/form_controls.py
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
class FormFrame(FormGenericControl):
    """A frame in which controls may be visually arranged, "form:frame".

    Attributes:
        control_implementation (str or None): The control implementation.
        disabled (bool): If True, the control is disabled.
        form_for (str or None): The ID of the control this frame is for.
        id (str or None): The unique XML ID (form:id).
        label (str or None): The label of the control.
        name (str or None): The name of the control.
        printable (bool): If True, the control is printable.
        title (str or None): The title or tooltip of the control.
        xforms_bind (str or None): The XForms bind expression.
        xml_id (str or None): The unique XML ID.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:frame"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("control_implementation", "form:control-implementation"),
        PropDefBool("disabled", "form:disabled", False),
        PropDef("form_for", "form:for"),
        PropDef("label", "form:label"),
        PropDef("name", "form:name"),
        PropDefBool("printable", "form:printable", True),
        PropDef("title", "form:title"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("xml_id", "xml:id"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        title: str | None = None,
        label: str | None = None,
        form_for: str | None = None,
        control_implementation: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormFrame, "form:frame".

        The "form:frame" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            title: The title or tooltip of the control.
            label: The label of the control.
            form_for: The ID of the control this frame is for.
            control_implementation: The control implementation.
            disabled: If True, the control is disabled.
            printable: If True, the control is printable.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if disabled is not None:
                self.disabled = disabled
            if form_for is not None:
                self.form_for = form_for
            if label is not None:
                self.label = label
            if printable is not None:
                self.printable = printable
            if title is not None:
                self.title = title

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDefBool("disabled", "form:disabled", False),
    PropDef("form_for", "form:for"),
    PropDef("label", "form:label"),
    PropDef("name", "form:name"),
    PropDefBool("printable", "form:printable", True),
    PropDef("title", "form:title"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("xml_id", "xml:id"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:frame'

disabled instance-attribute

disabled = disabled

form_for instance-attribute

form_for = form_for

label instance-attribute

label = label

printable instance-attribute

printable = printable

title instance-attribute

title = title

__init__

__init__(
    name: str | None = None,
    title: str | None = None,
    label: str | None = None,
    form_for: str | None = None,
    control_implementation: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormFrame, “form:frame”.

The “form:frame” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
title str | None

The title or tooltip of the control.

None
label str | None

The label of the control.

None
form_for str | None

The ID of the control this frame is for.

None
control_implementation str | None

The control implementation.

None
disabled bool | None

If True, the control is disabled.

None
printable bool | None

If True, the control is printable.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
def __init__(
    self,
    name: str | None = None,
    title: str | None = None,
    label: str | None = None,
    form_for: str | None = None,
    control_implementation: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormFrame, "form:frame".

    The "form:frame" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        title: The title or tooltip of the control.
        label: The label of the control.
        form_for: The ID of the control this frame is for.
        control_implementation: The control implementation.
        disabled: If True, the control is disabled.
        printable: If True, the control is printable.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if disabled is not None:
            self.disabled = disabled
        if form_for is not None:
            self.form_for = form_for
        if label is not None:
            self.label = label
        if printable is not None:
            self.printable = printable
        if title is not None:
            self.title = title

FormGenericControl

Bases: Element

An implementation-defined placeholder for a generic control, “form:generic-control”.

The generic control can contain any properties and any events.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

control_implementation str or None

The control implementation.

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormGenericControl, “form:generic-control”.

__repr__
Source code in odfdo/form_controls.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
class FormGenericControl(Element):
    """An implementation-defined placeholder for a generic control, "form:generic-control".

    The generic control can contain any properties and any events.

    Attributes:
        name (str or None): The name of the control (form:name).
        control_implementation (str or None): The control implementation.
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:generic-control"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        control_implementation: str | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormGenericControl, "form:generic-control".

        The "form:generic-control" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            control_implementation: The control implementation.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(**kwargs)
        if self._do_init:
            if name is not None:
                self.name = name
            if control_implementation is not None:
                self.control_implementation = control_implementation
            if xml_id is not None:
                self.xml_id = xml_id
            if xforms_bind is not None:
                self.xforms_bind = xforms_bind
            if form_id is None:
                self.form_id = self.xml_id
            else:
                self.form_id = form_id

    def __repr__(self) -> str:
        return f"<{self.__class__.__name__} name={self.name} xml_id={self.xml_id}>"

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:generic-control'

control_implementation instance-attribute

control_implementation = control_implementation

form_id instance-attribute

form_id = xml_id

name instance-attribute

name = name

xforms_bind instance-attribute

xforms_bind = xforms_bind

xml_id instance-attribute

xml_id = xml_id

__init__

__init__(
    name: str | None = None,
    control_implementation: str | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormGenericControl, “form:generic-control”.

The “form:generic-control” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
control_implementation str | None

The control implementation.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
def __init__(
    self,
    name: str | None = None,
    control_implementation: str | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormGenericControl, "form:generic-control".

    The "form:generic-control" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        control_implementation: The control implementation.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(**kwargs)
    if self._do_init:
        if name is not None:
            self.name = name
        if control_implementation is not None:
            self.control_implementation = control_implementation
        if xml_id is not None:
            self.xml_id = xml_id
        if xforms_bind is not None:
            self.xforms_bind = xforms_bind
        if form_id is None:
            self.form_id = self.xml_id
        else:
            self.form_id = form_id

__repr__

__repr__() -> str
Source code in odfdo/form_controls.py
157
158
def __repr__(self) -> str:
    return f"<{self.__class__.__name__} name={self.name} xml_id={self.xml_id}>"

FormGrid

Bases: FormGenericControl

A control a control that displays table data, “form:grid”.

Each column in the grid is specified by a “form:column” element.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

control_implementation str or None

The control implementation.

title str or None

The title or tooltip of the control.

disabled bool

Specifies if the control is disabled (form:disabled). Default is False.

printable bool

Specifies if the control is printable (form:printable). Default is True.

tab_stop bool

Specifies if the control is a tab stop (form:tab-stop). Default is True.

tab_index int or None

The tab order of the control (form:tab-index). Default is 0.

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormGrid, “form:grid”.

Source code in odfdo/form_controls.py
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
class FormGrid(FormGenericControl):
    """A control a control that displays table data, "form:grid".

    Each column in the grid is specified by a "form:column" element.

    Attributes:
        name (str or None): The name of the control (form:name).
        control_implementation (str or None): The control implementation.
        title (str or None): The title or tooltip of the control.
        disabled (bool): Specifies if the control is disabled (form:disabled). Default is False.
        printable (bool): Specifies if the control is printable (form:printable). Default is True.
        tab_stop (bool): Specifies if the control is a tab stop (form:tab-stop). Default is True.
        tab_index (int or None): The tab order of the control (form:tab-index). Default is 0.
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:grid"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        control_implementation: str | None = None,
        title: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormGrid, "form:grid".

        The "form:grid" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            control_implementation: The control implementation.
            title: The title or tooltip.
            disabled: Specifies if the control is disabled.
            printable: Specifies if the control is printable.
            tab_index: The tab order of the control.
            tab_stop: Specifies if the control is a tab stop.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if title is not None:
                self.title = title
            if disabled is not None:
                self.disabled = disabled
            if printable is not None:
                self.printable = printable
            self.tab_index = tab_index
            if tab_stop is not None:
                self.tab_stop = tab_stop

    @property
    def tab_index(self) -> int | None:
        return self._get_attribute_int_default("form:tab-index", 0)

    @tab_index.setter
    def tab_index(self, tab_index: int | None) -> None:
        self._set_attribute_int_default("form:tab-index", tab_index, 0)

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:grid'

disabled instance-attribute

disabled = disabled

printable instance-attribute

printable = printable

tab_index property writable

tab_index: int | None

tab_stop instance-attribute

tab_stop = tab_stop

title instance-attribute

title = title

__init__

__init__(
    name: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormGrid, “form:grid”.

The “form:grid” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip.

None
disabled bool | None

Specifies if the control is disabled.

None
printable bool | None

Specifies if the control is printable.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

Specifies if the control is a tab stop.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
def __init__(
    self,
    name: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormGrid, "form:grid".

    The "form:grid" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        control_implementation: The control implementation.
        title: The title or tooltip.
        disabled: Specifies if the control is disabled.
        printable: Specifies if the control is printable.
        tab_index: The tab order of the control.
        tab_stop: Specifies if the control is a tab stop.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if title is not None:
            self.title = title
        if disabled is not None:
            self.disabled = disabled
        if printable is not None:
            self.printable = printable
        self.tab_index = tab_index
        if tab_stop is not None:
            self.tab_stop = tab_stop

FormHidden

Bases: FormAsDictMixin, FormGenericControl

A control that does not have a visual representation, “form:hidden”.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

value str or None

The value of the control.

control_implementation str or None

The control implementation.

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormHidden, “form:hidden”.

__str__
Source code in odfdo/form_controls.py
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
class FormHidden(FormAsDictMixin, FormGenericControl):
    """A control that does not have a visual representation, "form:hidden".

    Attributes:
        name (str or None): The name of the control (form:name).
        value (str or None): The value of the control.
        control_implementation (str or None): The control implementation.
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:hidden"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("value", "form:value"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormHidden, "form:hidden".

        The "form:hidden" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init and value is not None:
            self.value = value

    def __str__(self) -> str:
        return ""

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef("value", "form:value"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:hidden'

value instance-attribute

value = value

__init__

__init__(
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormHidden, “form:hidden”.

The “form:hidden” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
def __init__(
    self,
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormHidden, "form:hidden".

    The "form:hidden" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init and value is not None:
        self.value = value

__str__

__str__() -> str
Source code in odfdo/form_controls.py
220
221
def __str__(self) -> str:
    return ""

FormImage

Bases: OfficeTargetFrameMixin, FormButtonTypeMixin, FormGrid

A graphical button control, “form:image”.

Note: HTML 4.01 only allows the button type to be “submit” for an image button. In OpenDocument, an image button can be of any type.

Attributes:

Name Type Description
button_type str or None

The type of the button.

control_implementation str or None

The control implementation.

disabled bool

If True, the control is disabled.

image_data str or None

The image data for the button.

name str or None

The name of the control.

printable bool

If True, the control is printable.

tab_index int or None

The tab order of the control.

tab_stop bool

If True, the control is a tab stop.

title str

The title or tooltip of the control.

value str

The value of the control.

target_frame str

The target frame for the URL.

xforms_bind str

The XForms bind expression.

href str

The URL to navigate to when the button is clicked.

xml_id str

The unique XML ID.

form_id str

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormImage, “form:image”.

Source code in odfdo/form_controls.py
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
class FormImage(OfficeTargetFrameMixin, FormButtonTypeMixin, FormGrid):
    """A graphical button control, "form:image".

    Note: HTML 4.01 only allows the button type to be “submit” for an image
    button. In OpenDocument, an image button can be of any type.

    Attributes:
        button_type (str or None): The type of the button.
        control_implementation (str or None): The control implementation.
        disabled (bool): If True, the control is disabled.
        image_data (str or None): The image data for the button.
        name (str or None): The name of the control.
        printable (bool): If True, the control is printable.
        tab_index (int or None): The tab order of the control.
        tab_stop (bool): If True, the control is a tab stop.
        title (str): The title or tooltip of the control.
        value (str): The value of the control.
        target_frame (str): The target frame for the URL.
        xforms_bind (str): The XForms bind expression.
        href (str): The URL to navigate to when the button is clicked.
        xml_id (str): The unique XML ID.
        form_id (str): The form ID (deprecated).
    """

    _tag = "form:image"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("control_implementation", "form:control-implementation"),
        PropDefBool("disabled", "form:disabled", False),
        PropDef("image_data", "form:image-data"),
        PropDef("name", "form:name"),
        PropDefBool("printable", "form:printable", True),
        PropDef("tab_index", "form:tab-index"),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDef("title", "form:title"),
        PropDef("value", "form:value"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("href", "xlink:href"),
        PropDef("xml_id", "xml:id"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        title: str | None = None,
        value: str | None = None,
        button_type: str | None = None,
        control_implementation: str | None = None,
        disabled: bool | None = None,
        image_data: str | None = None,
        target_frame: str | None = None,
        href: str | None = None,
        printable: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormImage, "form:image".

        The "form:image" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            title: The title or tooltip of the control.
            value: The value of the control.
            button_type: The type of the button.
            control_implementation: The control implementation.
            disabled: If True, the control is disabled.
            image_data: The image data for the button.
            target_frame: The target frame for the URL.
            href: The URL to navigate to when the button is clicked.
            printable: If True, the control is printable.
            tab_index: The tab order of the control.
            tab_stop: If True, the control is a tab stop.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            disabled=disabled,
            printable=printable,
            title=title,
            tab_index=tab_index,
            tab_stop=tab_stop,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if value is not None:
                self.value = value
            if button_type is not None:
                self.button_type = button_type
            if image_data is not None:
                self.image_data = image_data
            if target_frame is not None:
                self.target_frame = target_frame
            if href is not None:
                self.href = href

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDefBool("disabled", "form:disabled", False),
    PropDef("image_data", "form:image-data"),
    PropDef("name", "form:name"),
    PropDefBool("printable", "form:printable", True),
    PropDef("tab_index", "form:tab-index"),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDef("title", "form:title"),
    PropDef("value", "form:value"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("href", "xlink:href"),
    PropDef("xml_id", "xml:id"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:image'

button_type instance-attribute

button_type = button_type

href instance-attribute

href = href

image_data instance-attribute

image_data = image_data

target_frame instance-attribute

target_frame = target_frame

value instance-attribute

value = value

__init__

__init__(
    name: str | None = None,
    title: str | None = None,
    value: str | None = None,
    button_type: str | None = None,
    control_implementation: str | None = None,
    disabled: bool | None = None,
    image_data: str | None = None,
    target_frame: str | None = None,
    href: str | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormImage, “form:image”.

The “form:image” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
title str | None

The title or tooltip of the control.

None
value str | None

The value of the control.

None
button_type str | None

The type of the button.

None
control_implementation str | None

The control implementation.

None
disabled bool | None

If True, the control is disabled.

None
image_data str | None

The image data for the button.

None
target_frame str | None

The target frame for the URL.

None
href str | None

The URL to navigate to when the button is clicked.

None
printable bool | None

If True, the control is printable.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

If True, the control is a tab stop.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
def __init__(
    self,
    name: str | None = None,
    title: str | None = None,
    value: str | None = None,
    button_type: str | None = None,
    control_implementation: str | None = None,
    disabled: bool | None = None,
    image_data: str | None = None,
    target_frame: str | None = None,
    href: str | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormImage, "form:image".

    The "form:image" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        title: The title or tooltip of the control.
        value: The value of the control.
        button_type: The type of the button.
        control_implementation: The control implementation.
        disabled: If True, the control is disabled.
        image_data: The image data for the button.
        target_frame: The target frame for the URL.
        href: The URL to navigate to when the button is clicked.
        printable: If True, the control is printable.
        tab_index: The tab order of the control.
        tab_stop: If True, the control is a tab stop.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        disabled=disabled,
        printable=printable,
        title=title,
        tab_index=tab_index,
        tab_stop=tab_stop,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if value is not None:
            self.value = value
        if button_type is not None:
            self.button_type = button_type
        if image_data is not None:
            self.image_data = image_data
        if target_frame is not None:
            self.target_frame = target_frame
        if href is not None:
            self.href = href

FormImageFrame

Bases: FormGenericControl

A graphical control displaying an image, “form:image-frame”.

The control displays an image, whose location is described in the control.

Attributes:

Name Type Description
control_implementation str or None

The control implementation.

data_field str or None

The data field used for storing the value.

disabled bool

If True, the control is disabled.

id str or None

The unique XML ID (form:id).

image_data str or None

The image data for the control.

name str or None

The name of the control.

printable bool

If True, the control is printable.

readonly bool

If True, the control is read-only.

title str or None

The title or tooltip of the control.

xforms_bind str or None

The XForms bind expression.

xml_id str or None

The unique XML ID.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormImageFrame, “form:image-frame”.

Source code in odfdo/form_controls.py
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
class FormImageFrame(FormGenericControl):
    """A graphical control displaying an image, "form:image-frame".

    The control displays an image, whose location is described in the control.

    Attributes:
        control_implementation (str or None): The control implementation.
        data_field (str or None): The data field used for storing the value.
        disabled (bool): If True, the control is disabled.
        id (str or None): The unique XML ID (form:id).
        image_data (str or None): The image data for the control.
        name (str or None): The name of the control.
        printable (bool): If True, the control is printable.
        readonly (bool): If True, the control is read-only.
        title (str or None): The title or tooltip of the control.
        xforms_bind (str or None): The XForms bind expression.
        xml_id (str or None): The unique XML ID.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:image-frame"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("data_field", "form:data-field"),
        PropDefBool("disabled", "form:disabled", False),
        PropDef("image_data", "form:image-data"),
        PropDef("name", "form:name"),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("readonly", "form:readonly", False),
        PropDef("title", "form:title"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("xml_id", "xml:id"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        title: str | None = None,
        control_implementation: str | None = None,
        data_field: str | None = None,
        disabled: bool | None = None,
        image_data: str | None = None,
        printable: bool | None = None,
        readonly: bool | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormImageFrame, "form:image-frame".

        The "form:image-frame" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            title: The title or tooltip of the control.
            control_implementation: The control implementation.
            data_field: The data field used for storing the value.
            disabled: If True, the control is disabled.
            image_data: The image data for the control.
            printable: If True, the control is printable.
            readonly: If True, the control is read-only.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if data_field is not None:
                self.data_field = data_field
            if disabled is not None:
                self.disabled = disabled
            if image_data is not None:
                self.image_data = image_data
            if printable is not None:
                self.printable = printable
            if readonly is not None:
                self.readonly = readonly
            if title is not None:
                self.title = title

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("data_field", "form:data-field"),
    PropDefBool("disabled", "form:disabled", False),
    PropDef("image_data", "form:image-data"),
    PropDef("name", "form:name"),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("readonly", "form:readonly", False),
    PropDef("title", "form:title"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("xml_id", "xml:id"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:image-frame'

data_field instance-attribute

data_field = data_field

disabled instance-attribute

disabled = disabled

image_data instance-attribute

image_data = image_data

printable instance-attribute

printable = printable

readonly instance-attribute

readonly = readonly

title instance-attribute

title = title

__init__

__init__(
    name: str | None = None,
    title: str | None = None,
    control_implementation: str | None = None,
    data_field: str | None = None,
    disabled: bool | None = None,
    image_data: str | None = None,
    printable: bool | None = None,
    readonly: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormImageFrame, “form:image-frame”.

The “form:image-frame” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
title str | None

The title or tooltip of the control.

None
control_implementation str | None

The control implementation.

None
data_field str | None

The data field used for storing the value.

None
disabled bool | None

If True, the control is disabled.

None
image_data str | None

The image data for the control.

None
printable bool | None

If True, the control is printable.

None
readonly bool | None

If True, the control is read-only.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
def __init__(
    self,
    name: str | None = None,
    title: str | None = None,
    control_implementation: str | None = None,
    data_field: str | None = None,
    disabled: bool | None = None,
    image_data: str | None = None,
    printable: bool | None = None,
    readonly: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormImageFrame, "form:image-frame".

    The "form:image-frame" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        title: The title or tooltip of the control.
        control_implementation: The control implementation.
        data_field: The data field used for storing the value.
        disabled: If True, the control is disabled.
        image_data: The image data for the control.
        printable: If True, the control is printable.
        readonly: If True, the control is read-only.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if data_field is not None:
            self.data_field = data_field
        if disabled is not None:
            self.disabled = disabled
        if image_data is not None:
            self.image_data = image_data
        if printable is not None:
            self.printable = printable
        if readonly is not None:
            self.readonly = readonly
        if title is not None:
            self.title = title

FormItem

Bases: Element

A list item for a FormCombobox control, “form:item”.

Attributes:

Name Type Description
label str or None

The label of the item (form:label).

Methods:

Name Description
__init__

Create a FormItem, “form:item”.

Source code in odfdo/form_controls.py
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
class FormItem(Element):
    """A list item for a FormCombobox control, "form:item".

    Attributes:
        label (str or None): The label of the item (form:label).
    """

    _tag = "form:item"
    _properties: tuple[PropDef | PropDefBool, ...] = (PropDef("label", "form:label"),)

    def __init__(
        self,
        label: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormItem, "form:item".

        The "form:item" element is usable within the following element:
        "form:combobox".

        Args:
            label: The label of the item.
        """
        super().__init__(**kwargs)
        if self._do_init:
            self.label = label or ""

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("label", "form:label"),
)

_tag class-attribute instance-attribute

_tag = 'form:item'

label instance-attribute

label = label or ''

__init__

__init__(label: str | None = None, **kwargs: Any) -> None

Create a FormItem, “form:item”.

The “form:item” element is usable within the following element: “form:combobox”.

Parameters:

Name Type Description Default
label str | None

The label of the item.

None
Source code in odfdo/form_controls.py
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
def __init__(
    self,
    label: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormItem, "form:item".

    The "form:item" element is usable within the following element:
    "form:combobox".

    Args:
        label: The label of the item.
    """
    super().__init__(**kwargs)
    if self._do_init:
        self.label = label or ""

FormListbox

Bases: FormSourceListMixin, FormSizetMixin, FormGrid

An input control that allows a user to select one or more items from a list, “form:listbox”.

It is an alternative representation for a group of radio buttons.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

control_implementation str or None

The control implementation (form:control-implementation).

title str or None

The title or tooltip of the control (form:title).

disabled bool

Specifies if the control is disabled (form:disabled).

printable bool

Specifies if the control is printable (form:printable).

dropdown bool

Specifies if the listbox is a dropdown (form:dropdown).

bound_column str or None

The bound column for the listbox (form:bound-column).

multiple bool

Specifies if multiple selections are allowed (form:multiple).

list_source str or None

The source of the list (form:list-source).

source_cell_range str or None

The cell range for the list source (form:source-cell-range).

tab_stop bool

Specifies if the control is a tab stop (form:tab-stop).

data_field str or None

The data field used for storing the value (form:data-field).

linked_cell str or None

The linked spreadsheet cell (form:linked-cell).

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression (xforms:bind).

xforms_list_source str or None

The XForms list source (form:xforms-list-source).

form_id str or None

The form ID (deprecated, form:id).

list_linkage_type str or None

The list linkage type (form:list-linkage-type).

size int or None

The size of the listbox (form:size).

list_source_type str or None

The type of the list source (form:list-source-type).

Methods:

Name Description
__init__

Create a FormListbox, “form:listbox”.

Source code in odfdo/form_controls.py
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
class FormListbox(FormSourceListMixin, FormSizetMixin, FormGrid):
    """An input control that allows a user to select one or more items from
    a list, "form:listbox".

    It is an alternative representation for a group of radio buttons.

    Attributes:
        name (str or None): The name of the control (form:name).
        control_implementation (str or None): The control implementation (form:control-implementation).
        title (str or None): The title or tooltip of the control (form:title).
        disabled (bool): Specifies if the control is disabled (form:disabled).
        printable (bool): Specifies if the control is printable (form:printable).
        dropdown (bool): Specifies if the listbox is a dropdown (form:dropdown).
        bound_column (str or None): The bound column for the listbox (form:bound-column).
        multiple (bool): Specifies if multiple selections are allowed (form:multiple).
        list_source (str or None): The source of the list (form:list-source).
        source_cell_range (str or None): The cell range for the list source (form:source-cell-range).
        tab_stop (bool): Specifies if the control is a tab stop (form:tab-stop).
        data_field (str or None): The data field used for storing the value (form:data-field).
        linked_cell (str or None): The linked spreadsheet cell (form:linked-cell).
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression (xforms:bind).
        xforms_list_source (str or None): The XForms list source (form:xforms-list-source).
        form_id (str or None): The form ID (deprecated, form:id).
        list_linkage_type (str or None): The list linkage type (form:list-linkage-type).
        size (int or None): The size of the listbox (form:size).
        list_source_type (str or None): The type of the list source (form:list-source-type).
    """

    _tag = "form:listbox"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("dropdown", "form:dropdown", False),
        PropDef("bound_column", "form:bound-column"),
        PropDefBool("multiple", "form:multiple", False),
        PropDef("list_source", "form:list-source"),
        PropDef("source_cell_range", "form:source-cell-range"),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDef("data_field", "form:data-field"),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("xforms_list_source", "form:xforms-list-source"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    LIST_LINKAGE_TYPE: ClassVar[set[str]] = {
        "selection",
        "selection-indices",
    }

    def __init__(
        self,
        name: str | None = None,
        control_implementation: str | None = None,
        title: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        dropdown: bool | None = None,
        bound_column: str | None = None,
        list_linkage_type: str | None = None,
        multiple: bool | None = None,
        list_source: str | None = None,
        list_source_type: str | None = None,
        source_cell_range: str | None = None,
        size: int | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        data_field: str | None = None,
        linked_cell: str | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        xforms_list_source: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormListbox, "form:listbox".

        The "form:listbox" element is usable within the following elements:
        "form:column" and "form:form".

        Args:
            name: The name of the control.
            control_implementation: The control implementation.
            title: The title or tooltip of the control.
            disabled: If True, the control is disabled.
            printable: If True, the control is printable.
            dropdown: If True, the listbox is a dropdown.
            bound_column: The bound column for the listbox.
            list_linkage_type: The list linkage type.
            multiple: If True, multiple selections are allowed.
            list_source: The source of the list.
            list_source_type: The type of the list source.
            source_cell_range: The cell range for the list source.
            size: The size of the listbox.
            tab_index: The tab order of the control.
            tab_stop: If True, the control is a tab stop.
            data_field: The data field for storing the value.
            linked_cell: The linked spreadsheet cell.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            xforms_list_source: The XForms list source.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            title=title,
            disabled=disabled,
            printable=printable,
            tab_index=tab_index,
            tab_stop=tab_stop,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if data_field is not None:
                self.data_field = data_field
            if linked_cell is not None:
                self.linked_cell = linked_cell
            if dropdown is not None:
                self.dropdown = dropdown
            if bound_column is not None:
                self.bound_column = bound_column
            if list_linkage_type is not None:
                self.list_linkage_type = list_linkage_type
            if multiple is not None:
                self.multiple = multiple
            if list_source is not None:
                self.list_source = list_source
            if list_source_type is not None:
                self.list_source_type = list_source_type
            if source_cell_range is not None:
                self.source_cell_range = source_cell_range
            if size is not None:
                self.size = size
            if xforms_list_source is not None:
                self.xforms_list_source = xforms_list_source

    @property
    def list_linkage_type(self) -> str | None:
        return self.get_attribute_string("form:list-linkage-type")

    @list_linkage_type.setter
    def list_linkage_type(self, list_linkage_type: str | None) -> None:
        if list_linkage_type is None:
            self.del_attribute("form:list-linkage-type")
            return
        if list_linkage_type not in self.LIST_LINKAGE_TYPE:
            raise ValueError
        self.set_attribute("form:list-linkage-type", list_linkage_type)

LIST_LINKAGE_TYPE class-attribute

LIST_LINKAGE_TYPE: set[str] = {
    "selection",
    "selection-indices",
}

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("dropdown", "form:dropdown", False),
    PropDef("bound_column", "form:bound-column"),
    PropDefBool("multiple", "form:multiple", False),
    PropDef("list_source", "form:list-source"),
    PropDef("source_cell_range", "form:source-cell-range"),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDef("data_field", "form:data-field"),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef(
        "xforms_list_source", "form:xforms-list-source"
    ),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:listbox'

bound_column instance-attribute

bound_column = bound_column

data_field instance-attribute

data_field = data_field

dropdown instance-attribute

dropdown = dropdown

linked_cell instance-attribute

linked_cell = linked_cell

list_linkage_type property writable

list_linkage_type: str | None

list_source instance-attribute

list_source = list_source

list_source_type instance-attribute

list_source_type = list_source_type

multiple instance-attribute

multiple = multiple

size instance-attribute

size = size

source_cell_range instance-attribute

source_cell_range = source_cell_range

xforms_list_source instance-attribute

xforms_list_source = xforms_list_source

__init__

__init__(
    name: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    dropdown: bool | None = None,
    bound_column: str | None = None,
    list_linkage_type: str | None = None,
    multiple: bool | None = None,
    list_source: str | None = None,
    list_source_type: str | None = None,
    source_cell_range: str | None = None,
    size: int | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    data_field: str | None = None,
    linked_cell: str | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    xforms_list_source: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormListbox, “form:listbox”.

The “form:listbox” element is usable within the following elements: “form:column” and “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip of the control.

None
disabled bool | None

If True, the control is disabled.

None
printable bool | None

If True, the control is printable.

None
dropdown bool | None

If True, the listbox is a dropdown.

None
bound_column str | None

The bound column for the listbox.

None
list_linkage_type str | None

The list linkage type.

None
multiple bool | None

If True, multiple selections are allowed.

None
list_source str | None

The source of the list.

None
list_source_type str | None

The type of the list source.

None
source_cell_range str | None

The cell range for the list source.

None
size int | None

The size of the listbox.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

If True, the control is a tab stop.

None
data_field str | None

The data field for storing the value.

None
linked_cell str | None

The linked spreadsheet cell.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
xforms_list_source str | None

The XForms list source.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
def __init__(
    self,
    name: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    dropdown: bool | None = None,
    bound_column: str | None = None,
    list_linkage_type: str | None = None,
    multiple: bool | None = None,
    list_source: str | None = None,
    list_source_type: str | None = None,
    source_cell_range: str | None = None,
    size: int | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    data_field: str | None = None,
    linked_cell: str | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    xforms_list_source: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormListbox, "form:listbox".

    The "form:listbox" element is usable within the following elements:
    "form:column" and "form:form".

    Args:
        name: The name of the control.
        control_implementation: The control implementation.
        title: The title or tooltip of the control.
        disabled: If True, the control is disabled.
        printable: If True, the control is printable.
        dropdown: If True, the listbox is a dropdown.
        bound_column: The bound column for the listbox.
        list_linkage_type: The list linkage type.
        multiple: If True, multiple selections are allowed.
        list_source: The source of the list.
        list_source_type: The type of the list source.
        source_cell_range: The cell range for the list source.
        size: The size of the listbox.
        tab_index: The tab order of the control.
        tab_stop: If True, the control is a tab stop.
        data_field: The data field for storing the value.
        linked_cell: The linked spreadsheet cell.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        xforms_list_source: The XForms list source.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        title=title,
        disabled=disabled,
        printable=printable,
        tab_index=tab_index,
        tab_stop=tab_stop,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if data_field is not None:
            self.data_field = data_field
        if linked_cell is not None:
            self.linked_cell = linked_cell
        if dropdown is not None:
            self.dropdown = dropdown
        if bound_column is not None:
            self.bound_column = bound_column
        if list_linkage_type is not None:
            self.list_linkage_type = list_linkage_type
        if multiple is not None:
            self.multiple = multiple
        if list_source is not None:
            self.list_source = list_source
        if list_source_type is not None:
            self.list_source_type = list_source_type
        if source_cell_range is not None:
            self.source_cell_range = source_cell_range
        if size is not None:
            self.size = size
        if xforms_list_source is not None:
            self.xforms_list_source = xforms_list_source

FormNumber

Bases: FormDelayRepeatMixin, FormAsDictMixin, FormMaxLengthMixin, FormGrid

A control which allows the user to enter a floating-point number, “form:number”.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

value str or None

The value of the control (form:value).

control_implementation str or None

The control implementation (form:control-implementation).

title str or None

The title or tooltip of the control (form:title).

disabled bool

Specifies if the control is disabled (form:disabled).

printable bool

Specifies if the control is printable (form:printable).

tab_stop bool

Specifies if the control is a tab stop (form:tab-stop).

readonly bool

Specifies if the control is read-only (form:readonly).

convert_empty_to_null bool

Specifies if an empty value is converted to null (form:convert-empty-to-null).

data_field str or None

The data field used for storing the value (form:data-field).

repeat bool or None

Specifies if the control repeats when a button is clicked (form:repeat).

linked_cell str or None

The linked spreadsheet cell (form:linked-cell).

spin_button bool

Specifies if a spin button is available (form:spin-button).

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression (xforms:bind).

form_id str or None

The form ID (deprecated, form:id).

current_value Decimal or int or None

The current value of the control (form:current-value).

min_value Decimal or int or None

The minimum numeric value allowed (form:min-value).

max_value Decimal or int or None

The maximum numeric value allowed (form:max-value).

tab_index int or None

The tab order of the control (form:tab-index).

max_length int or None

The maximum number of characters allowed (form:max-length).

delay_for_repeat str or None

The delay for repeating the action (form:delay-for-repeat).

Methods:

Name Description
__init__

Create a FormNumber, “form:number”.

__str__
Source code in odfdo/form_controls.py
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
class FormNumber(FormDelayRepeatMixin, FormAsDictMixin, FormMaxLengthMixin, FormGrid):
    """A control which allows the user to enter a floating-point number,
    "form:number".

    Attributes:
        name (str or None): The name of the control (form:name).
        value (str or None): The value of the control (form:value).
        control_implementation (str or None): The control implementation (form:control-implementation).
        title (str or None): The title or tooltip of the control (form:title).
        disabled (bool): Specifies if the control is disabled (form:disabled).
        printable (bool): Specifies if the control is printable (form:printable).
        tab_stop (bool): Specifies if the control is a tab stop (form:tab-stop).
        readonly (bool): Specifies if the control is read-only (form:readonly).
        convert_empty_to_null (bool): Specifies if an empty value is converted to null (form:convert-empty-to-null).
        data_field (str or None): The data field used for storing the value (form:data-field).
        repeat (bool or None): Specifies if the control repeats when a button is clicked (form:repeat).
        linked_cell (str or None): The linked spreadsheet cell (form:linked-cell).
        spin_button (bool): Specifies if a spin button is available (form:spin-button).
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression (xforms:bind).
        form_id (str or None): The form ID (deprecated, form:id).
        current_value (Decimal or int or None): The current value of the control (form:current-value).
        min_value (Decimal or int or None): The minimum numeric value allowed (form:min-value).
        max_value (Decimal or int or None): The maximum numeric value allowed (form:max-value).
        tab_index (int or None): The tab order of the control (form:tab-index).
        max_length (int or None): The maximum number of characters allowed (form:max-length).
        delay_for_repeat (str or None): The delay for repeating the action (form:delay-for-repeat).
    """

    _tag = "form:number"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("value", "form:value"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDefBool("readonly", "form:readonly", False),
        PropDefBool("convert_empty_to_null", "form:convert-empty-to-null", False),
        PropDef("data_field", "form:data-field"),
        PropDef("repeat", "form:repeat"),
        PropDef("linked_cell", "form:linked-cell"),
        PropDefBool("spin_button", "form:spin-button", False),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        title: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        readonly: bool | None = None,
        convert_empty_to_null: bool | None = None,
        current_value: Decimal | int | float | None = None,
        data_field: str | None = None,
        repeat: bool | None = None,
        delay_for_repeat: str | None = None,
        linked_cell: str | None = None,
        max_length: int | None = None,
        min_value: Decimal | int | float | None = None,
        max_value: Decimal | int | float | None = None,
        spin_button: bool | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormNumber, "form:number".

        The "form:number" element is usable within the following elements:
        "form:column" and "form:form".

        Args:
            name: The name of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            title: The title or tooltip of the control.
            disabled: If True, the control is disabled.
            printable: If True, the control is printable.
            tab_index: The tab order of the control.
            tab_stop: If True, the control is a tab stop.
            readonly: If True, the control is read-only.
            convert_empty_to_null: If True, an empty value is converted to null.
            current_value: The current value of the control.
            data_field: The data field for storing the value.
            repeat: If True, the control repeats when a button is clicked.
            delay_for_repeat: The delay for repeating the action. Defaults to "PT0.050S".
            linked_cell: The linked spreadsheet cell.
            max_length: The maximum number of characters allowed.
            min_value: The minimum value allowed.
            max_value: The maximum value allowed.
            spin_button: If True, a spin button is available.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            title=title,
            disabled=disabled,
            printable=printable,
            tab_index=tab_index,
            tab_stop=tab_stop,
            max_length=max_length,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if value is not None:
                self.value = value
            if readonly is not None:
                self.readonly = readonly
            if convert_empty_to_null is not None:
                self.convert_empty_to_null = convert_empty_to_null
            if current_value is not None:
                self.current_value = current_value
            if data_field is not None:
                self.data_field = data_field
            if linked_cell is not None:
                self.linked_cell = linked_cell
            if repeat is not None:
                self.repeat = repeat
            if delay_for_repeat is not None:
                self.delay_for_repeat = delay_for_repeat
            if min_value is not None:
                self.min_value = min_value
            if max_value is not None:
                self.max_value = max_value
            if spin_button is not None:
                self.spin_button = spin_button

    @property
    def current_value(self) -> Decimal | int | None:
        return self.get_attribute_number("form:current-value")

    @current_value.setter
    def current_value(self, current_value: Decimal | int | float | None) -> None:
        self._set_attribute_number_default("form:current-value", current_value, None)

    @property
    def min_value(self) -> Decimal | int | None:
        return self.get_attribute_number("form:min-value")

    @min_value.setter
    def min_value(self, min_value: Decimal | int | float | None) -> None:
        self._set_attribute_number_default("form:min-value", min_value, None)

    @property
    def max_value(self) -> Decimal | int | None:
        return self.get_attribute_number("form:max-value")

    @max_value.setter
    def max_value(self, max_value: Decimal | int | float | None) -> None:
        self._set_attribute_number_default("form:max-value", max_value, None)

    def __str__(self) -> str:
        if self.current_value is not None:
            return str(self.current_value)
        return self.value or ""

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef("value", "form:value"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDefBool("readonly", "form:readonly", False),
    PropDefBool(
        "convert_empty_to_null",
        "form:convert-empty-to-null",
        False,
    ),
    PropDef("data_field", "form:data-field"),
    PropDef("repeat", "form:repeat"),
    PropDef("linked_cell", "form:linked-cell"),
    PropDefBool("spin_button", "form:spin-button", False),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:number'

convert_empty_to_null instance-attribute

convert_empty_to_null = convert_empty_to_null

current_value property writable

current_value: Decimal | int | None

data_field instance-attribute

data_field = data_field

delay_for_repeat instance-attribute

delay_for_repeat = delay_for_repeat

linked_cell instance-attribute

linked_cell = linked_cell

max_value property writable

max_value: Decimal | int | None

min_value property writable

min_value: Decimal | int | None

readonly instance-attribute

readonly = readonly

repeat instance-attribute

repeat = repeat

spin_button instance-attribute

spin_button = spin_button

value instance-attribute

value = value

__init__

__init__(
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: Decimal | int | float | None = None,
    data_field: str | None = None,
    repeat: bool | None = None,
    delay_for_repeat: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    min_value: Decimal | int | float | None = None,
    max_value: Decimal | int | float | None = None,
    spin_button: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormNumber, “form:number”.

The “form:number” element is usable within the following elements: “form:column” and “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip of the control.

None
disabled bool | None

If True, the control is disabled.

None
printable bool | None

If True, the control is printable.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

If True, the control is a tab stop.

None
readonly bool | None

If True, the control is read-only.

None
convert_empty_to_null bool | None

If True, an empty value is converted to null.

None
current_value Decimal | int | float | None

The current value of the control.

None
data_field str | None

The data field for storing the value.

None
repeat bool | None

If True, the control repeats when a button is clicked.

None
delay_for_repeat str | None

The delay for repeating the action. Defaults to “PT0.050S”.

None
linked_cell str | None

The linked spreadsheet cell.

None
max_length int | None

The maximum number of characters allowed.

None
min_value Decimal | int | float | None

The minimum value allowed.

None
max_value Decimal | int | float | None

The maximum value allowed.

None
spin_button bool | None

If True, a spin button is available.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
def __init__(
    self,
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: Decimal | int | float | None = None,
    data_field: str | None = None,
    repeat: bool | None = None,
    delay_for_repeat: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    min_value: Decimal | int | float | None = None,
    max_value: Decimal | int | float | None = None,
    spin_button: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormNumber, "form:number".

    The "form:number" element is usable within the following elements:
    "form:column" and "form:form".

    Args:
        name: The name of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        title: The title or tooltip of the control.
        disabled: If True, the control is disabled.
        printable: If True, the control is printable.
        tab_index: The tab order of the control.
        tab_stop: If True, the control is a tab stop.
        readonly: If True, the control is read-only.
        convert_empty_to_null: If True, an empty value is converted to null.
        current_value: The current value of the control.
        data_field: The data field for storing the value.
        repeat: If True, the control repeats when a button is clicked.
        delay_for_repeat: The delay for repeating the action. Defaults to "PT0.050S".
        linked_cell: The linked spreadsheet cell.
        max_length: The maximum number of characters allowed.
        min_value: The minimum value allowed.
        max_value: The maximum value allowed.
        spin_button: If True, a spin button is available.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        title=title,
        disabled=disabled,
        printable=printable,
        tab_index=tab_index,
        tab_stop=tab_stop,
        max_length=max_length,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if value is not None:
            self.value = value
        if readonly is not None:
            self.readonly = readonly
        if convert_empty_to_null is not None:
            self.convert_empty_to_null = convert_empty_to_null
        if current_value is not None:
            self.current_value = current_value
        if data_field is not None:
            self.data_field = data_field
        if linked_cell is not None:
            self.linked_cell = linked_cell
        if repeat is not None:
            self.repeat = repeat
        if delay_for_repeat is not None:
            self.delay_for_repeat = delay_for_repeat
        if min_value is not None:
            self.min_value = min_value
        if max_value is not None:
            self.max_value = max_value
        if spin_button is not None:
            self.spin_button = spin_button

__str__

__str__() -> str
Source code in odfdo/form_controls.py
1110
1111
1112
1113
def __str__(self) -> str:
    if self.current_value is not None:
        return str(self.current_value)
    return self.value or ""

FormOption

Bases: Element

A list item for a “form:option” control, “form:option”.

Methods:

Name Description
__init__

Create a FormOption, “form:option”.

Attributes:

Name Type Description
current_selected
label
selected
value
Source code in odfdo/form_controls.py
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
class FormOption(Element):
    """A list item for a "form:option" control, "form:option"."""

    _tag = "form:option"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("label", "form:label"),
        PropDef("value", "form:value"),
        PropDefBool("selected", "form:selected", False),
        PropDefBool("current_selected", "form:current-selected", False),
    )

    def __init__(
        self,
        label: str | None = None,
        value: str | None = None,
        selected: bool | None = None,
        current_selected: bool | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormOption, "form:option".

        The "form:option" element is usable within the following element:
        "form:listbox".

        Args:
            label: The label of the option.
            value: The value of the option.
            selected: If True, the option is selected by default.
            current_selected: If True, the option is currently selected.
        """
        super().__init__(**kwargs)
        if self._do_init:
            self.label = label or ""
            if value is not None:
                self.value = value
            if selected is not None:
                self.selected = selected
            if current_selected is not None:
                self.current_selected = current_selected

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("label", "form:label"),
    PropDef("value", "form:value"),
    PropDefBool("selected", "form:selected", False),
    PropDefBool(
        "current_selected", "form:current-selected", False
    ),
)

_tag class-attribute instance-attribute

_tag = 'form:option'

current_selected instance-attribute

current_selected = current_selected

label instance-attribute

label = label or ''

selected instance-attribute

selected = selected

value instance-attribute

value = value

__init__

__init__(
    label: str | None = None,
    value: str | None = None,
    selected: bool | None = None,
    current_selected: bool | None = None,
    **kwargs: Any,
) -> None

Create a FormOption, “form:option”.

The “form:option” element is usable within the following element: “form:listbox”.

Parameters:

Name Type Description Default
label str | None

The label of the option.

None
value str | None

The value of the option.

None
selected bool | None

If True, the option is selected by default.

None
current_selected bool | None

If True, the option is currently selected.

None
Source code in odfdo/form_controls.py
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
def __init__(
    self,
    label: str | None = None,
    value: str | None = None,
    selected: bool | None = None,
    current_selected: bool | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormOption, "form:option".

    The "form:option" element is usable within the following element:
    "form:listbox".

    Args:
        label: The label of the option.
        value: The value of the option.
        selected: If True, the option is selected by default.
        current_selected: If True, the option is currently selected.
    """
    super().__init__(**kwargs)
    if self._do_init:
        self.label = label or ""
        if value is not None:
            self.value = value
        if selected is not None:
            self.selected = selected
        if current_selected is not None:
            self.current_selected = current_selected

FormPassword

Bases: FormAsDictMixin, FormMaxLengthMixin, FormGrid

A control that uses an echo character to hide password input by a user, “form:password”.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

value str or None

The value of the control.

control_implementation str or None

The control implementation.

title str or None

The title or tooltip of the control.

echo_char str

The character used to echo password input (form:echo-char). Default is “*”.

disabled bool

Specifies if the control is disabled (form:disabled). Default is False.

printable bool

Specifies if the control is printable (form:printable). Default is True.

tab_stop bool

Specifies if the control is a tab stop (form:tab-stop). Default is True.

tab_index int or None

The tab order of the control (form:tab-index). Default is 0.

convert_empty_to_null bool

Specifies if an empty value is converted to null (form:convert-empty-to-null). Default is False.

linked_cell str or None

The linked spreadsheet cell.

max_length int or None

The maximum number of characters allowed (form:max-length).

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormPassword, “form:password”.

__str__
Source code in odfdo/form_controls.py
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
class FormPassword(FormAsDictMixin, FormMaxLengthMixin, FormGrid):
    """A control that uses an echo character to hide password input by a user, "form:password".

    Attributes:
        name (str or None): The name of the control (form:name).
        value (str or None): The value of the control.
        control_implementation (str or None): The control implementation.
        title (str or None): The title or tooltip of the control.
        echo_char (str): The character used to echo password input (form:echo-char). Default is "*".
        disabled (bool): Specifies if the control is disabled (form:disabled). Default is False.
        printable (bool): Specifies if the control is printable (form:printable). Default is True.
        tab_stop (bool): Specifies if the control is a tab stop (form:tab-stop). Default is True.
        tab_index (int or None): The tab order of the control (form:tab-index). Default is 0.
        convert_empty_to_null (bool): Specifies if an empty value is converted to null (form:convert-empty-to-null). Default is False.
        linked_cell (str or None): The linked spreadsheet cell.
        max_length (int or None): The maximum number of characters allowed (form:max-length).
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:password"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("value", "form:value"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDef("echo_char", "form:echo-char"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDefBool("convert_empty_to_null", "form:convert-empty-to-null", False),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        title: str | None = None,
        echo_char: str | None = "*",
        disabled: bool | None = None,
        printable: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        convert_empty_to_null: bool | None = None,
        linked_cell: str | None = None,
        max_length: int | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormPassword, "form:password".

        The "form:password" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            title: The title or tooltip.
            echo_char: The character used to echo password input. Defaults to "*".
            disabled: Specifies if the control is disabled.
            printable: Specifies if the control is printable.
            tab_index: The tab order of the control.
            tab_stop: Specifies if the control is a tab stop.
            convert_empty_to_null: Specifies if an empty value is converted to null.
            linked_cell: The linked spreadsheet cell.
            max_length: The maximum number of characters allowed.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            title=title,
            disabled=disabled,
            printable=printable,
            tab_index=tab_index,
            tab_stop=tab_stop,
            max_length=max_length,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if value is not None:
                self.value = value
            self.echo_char = echo_char or "*"
            if convert_empty_to_null is not None:
                self.convert_empty_to_null = convert_empty_to_null
            if linked_cell is not None:
                self.linked_cell = linked_cell
            if max_length is not None:
                self.max_length = max_length

    def __str__(self) -> str:
        return self.echo_char or ""

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef("value", "form:value"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDef("echo_char", "form:echo-char"),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDefBool(
        "convert_empty_to_null",
        "form:convert-empty-to-null",
        False,
    ),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:password'

convert_empty_to_null instance-attribute

convert_empty_to_null = convert_empty_to_null

echo_char instance-attribute

echo_char = echo_char or '*'

linked_cell instance-attribute

linked_cell = linked_cell

max_length instance-attribute

max_length = max_length

value instance-attribute

value = value

__init__

__init__(
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    echo_char: str | None = "*",
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    convert_empty_to_null: bool | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormPassword, “form:password”.

The “form:password” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip.

None
echo_char str | None

The character used to echo password input. Defaults to “*”.

'*'
disabled bool | None

Specifies if the control is disabled.

None
printable bool | None

Specifies if the control is printable.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

Specifies if the control is a tab stop.

None
convert_empty_to_null bool | None

Specifies if an empty value is converted to null.

None
linked_cell str | None

The linked spreadsheet cell.

None
max_length int | None

The maximum number of characters allowed.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
def __init__(
    self,
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    echo_char: str | None = "*",
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    convert_empty_to_null: bool | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormPassword, "form:password".

    The "form:password" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        title: The title or tooltip.
        echo_char: The character used to echo password input. Defaults to "*".
        disabled: Specifies if the control is disabled.
        printable: Specifies if the control is printable.
        tab_index: The tab order of the control.
        tab_stop: Specifies if the control is a tab stop.
        convert_empty_to_null: Specifies if an empty value is converted to null.
        linked_cell: The linked spreadsheet cell.
        max_length: The maximum number of characters allowed.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        title=title,
        disabled=disabled,
        printable=printable,
        tab_index=tab_index,
        tab_stop=tab_stop,
        max_length=max_length,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if value is not None:
            self.value = value
        self.echo_char = echo_char or "*"
        if convert_empty_to_null is not None:
            self.convert_empty_to_null = convert_empty_to_null
        if linked_cell is not None:
            self.linked_cell = linked_cell
        if max_length is not None:
            self.max_length = max_length

__str__

__str__() -> str
Source code in odfdo/form_controls.py
673
674
def __str__(self) -> str:
    return self.echo_char or ""

FormRadio

Bases: FormImageAlignMixin, FormImagePositionMixin, FormGrid

A control which acts like a check box except that when multiple radio buttons belong to the same group they are mutually exclusive, “form:radio”.

Radio buttons are defined to belong to the same group if they have the same control name, as specified by their form:name attribute.

If a group of radio buttons is bound to one database field, and a user selects any given button, the reference value of the selected radio button is written into its database field.

Attributes:

Name Type Description
control_implementation str or None

The control implementation.

current_selected bool

If True, the radio button is currently selected.

data_field str or None

The data field used for storing the value.

disabled bool

If True, the control is disabled.

id str or None

The unique XML ID (form:id).

image_align str or None

The alignment of the image.

image_position str or None

The position of the image.

label str or None

The label of the control.

linked_cell str or None

The linked spreadsheet cell.

name str or None

The name of the control.

printable bool

If True, the control is printable.

selected bool

If True, the radio button is selected by default.

tab_index int or None

The tab order of the control.

tab_stop bool

If True, the control is a tab stop.

title str or None

The title or tooltip of the control.

value str or None

The value of the control.

visual_effect str or None

The visual effect of the control.

xforms_bind str or None

The XForms bind expression.

xml_id str or None

The unique XML ID.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormRadio, “form:radio”.

Source code in odfdo/form_controls.py
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
class FormRadio(FormImageAlignMixin, FormImagePositionMixin, FormGrid):
    """A control which acts like a check box except that when multiple radio
    buttons belong to the same group they are mutually exclusive, "form:radio".

    Radio buttons are defined to belong to the same group if they have the same
    control name, as specified by their form:name attribute.

    If a group of radio buttons is bound to one database field, and a user
    selects any given button, the reference value of the selected radio button
    is written into its database field.

    Attributes:
        control_implementation (str or None): The control implementation.
        current_selected (bool): If True, the radio button is currently selected.
        data_field (str or None): The data field used for storing the value.
        disabled (bool): If True, the control is disabled.
        id (str or None): The unique XML ID (form:id).
        image_align (str or None): The alignment of the image.
        image_position (str or None): The position of the image.
        label (str or None): The label of the control.
        linked_cell (str or None): The linked spreadsheet cell.
        name (str or None): The name of the control.
        printable (bool): If True, the control is printable.
        selected (bool): If True, the radio button is selected by default.
        tab_index (int or None): The tab order of the control.
        tab_stop (bool): If True, the control is a tab stop.
        title (str or None): The title or tooltip of the control.
        value (str or None): The value of the control.
        visual_effect (str or None): The visual effect of the control.
        xforms_bind (str or None): The XForms bind expression.
        xml_id (str or None): The unique XML ID.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:radio"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("control_implementation", "form:control-implementation"),
        PropDefBool("current_selected", "form:current-selected", False),
        PropDef("data_field", "form:data-field"),
        PropDefBool("disabled", "form:disabled", False),
        PropDef("image_align", "form:image-align"),
        PropDef("image_position", "form:image-position"),
        PropDef("label", "form:label"),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("name", "form:name"),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("selected", "form:selected", False),
        PropDef("tab_index", "form:tab-index"),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDef("title", "form:title"),
        PropDef("value", "form:value"),
        PropDef("visual_effect", "form:visual-effect"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("xml_id", "xml:id"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        title: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        current_selected: bool | None = None,
        data_field: str | None = None,
        disabled: bool | None = None,
        image_align: str | None = None,
        image_position: str | None = None,
        label: str | None = None,
        linked_cell: str | None = None,
        printable: bool | None = None,
        selected: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        visual_effect: str | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormRadio, "form:radio".

        The "form:radio" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            title: The title or tooltip of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            current_selected: If True, the radio button is currently selected.
            data_field: The data field used for storing the value.
            disabled: If True, the control is disabled.
            image_align: The alignment of the image.
            image_position: The position of the image.
            label: The label of the control.
            linked_cell: The linked spreadsheet cell.
            printable: If True, the control is printable.
            selected: If True, the radio button is selected by default.
            tab_index: The tab order of the control.
            tab_stop: If True, the control is a tab stop.
            visual_effect: The visual effect of the control.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            disabled=disabled,
            printable=printable,
            title=title,
            tab_index=tab_index,
            tab_stop=tab_stop,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if current_selected is not None:
                self.current_selected = current_selected
            if data_field is not None:
                self.data_field = data_field
            if image_align is not None:
                self.image_align = image_align
            if image_position is not None:
                self.image_position = image_position
            if label is not None:
                self.label = label
            if linked_cell is not None:
                self.linked_cell = linked_cell
            if selected is not None:
                self.selected = selected
            if value is not None:
                self.value = value
            if visual_effect is not None:
                self.visual_effect = visual_effect

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDefBool(
        "current_selected", "form:current-selected", False
    ),
    PropDef("data_field", "form:data-field"),
    PropDefBool("disabled", "form:disabled", False),
    PropDef("image_align", "form:image-align"),
    PropDef("image_position", "form:image-position"),
    PropDef("label", "form:label"),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("name", "form:name"),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("selected", "form:selected", False),
    PropDef("tab_index", "form:tab-index"),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDef("title", "form:title"),
    PropDef("value", "form:value"),
    PropDef("visual_effect", "form:visual-effect"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("xml_id", "xml:id"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:radio'

current_selected instance-attribute

current_selected = current_selected

data_field instance-attribute

data_field = data_field

image_align instance-attribute

image_align = image_align

image_position instance-attribute

image_position = image_position

label instance-attribute

label = label

linked_cell instance-attribute

linked_cell = linked_cell

selected instance-attribute

selected = selected

value instance-attribute

value = value

visual_effect instance-attribute

visual_effect = visual_effect

__init__

__init__(
    name: str | None = None,
    title: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    current_selected: bool | None = None,
    data_field: str | None = None,
    disabled: bool | None = None,
    image_align: str | None = None,
    image_position: str | None = None,
    label: str | None = None,
    linked_cell: str | None = None,
    printable: bool | None = None,
    selected: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    visual_effect: str | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormRadio, “form:radio”.

The “form:radio” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
title str | None

The title or tooltip of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
current_selected bool | None

If True, the radio button is currently selected.

None
data_field str | None

The data field used for storing the value.

None
disabled bool | None

If True, the control is disabled.

None
image_align str | None

The alignment of the image.

None
image_position str | None

The position of the image.

None
label str | None

The label of the control.

None
linked_cell str | None

The linked spreadsheet cell.

None
printable bool | None

If True, the control is printable.

None
selected bool | None

If True, the radio button is selected by default.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

If True, the control is a tab stop.

None
visual_effect str | None

The visual effect of the control.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
def __init__(
    self,
    name: str | None = None,
    title: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    current_selected: bool | None = None,
    data_field: str | None = None,
    disabled: bool | None = None,
    image_align: str | None = None,
    image_position: str | None = None,
    label: str | None = None,
    linked_cell: str | None = None,
    printable: bool | None = None,
    selected: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    visual_effect: str | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormRadio, "form:radio".

    The "form:radio" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        title: The title or tooltip of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        current_selected: If True, the radio button is currently selected.
        data_field: The data field used for storing the value.
        disabled: If True, the control is disabled.
        image_align: The alignment of the image.
        image_position: The position of the image.
        label: The label of the control.
        linked_cell: The linked spreadsheet cell.
        printable: If True, the control is printable.
        selected: If True, the radio button is selected by default.
        tab_index: The tab order of the control.
        tab_stop: If True, the control is a tab stop.
        visual_effect: The visual effect of the control.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        disabled=disabled,
        printable=printable,
        title=title,
        tab_index=tab_index,
        tab_stop=tab_stop,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if current_selected is not None:
            self.current_selected = current_selected
        if data_field is not None:
            self.data_field = data_field
        if image_align is not None:
            self.image_align = image_align
        if image_position is not None:
            self.image_position = image_position
        if label is not None:
            self.label = label
        if linked_cell is not None:
            self.linked_cell = linked_cell
        if selected is not None:
            self.selected = selected
        if value is not None:
            self.value = value
        if visual_effect is not None:
            self.visual_effect = visual_effect

FormText

Bases: FormAsDictMixin, FormMaxLengthMixin, FormGrid

A control for displaying and inputting text on a single line, “form:text”.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

value str or None

The value of the control.

control_implementation str or None

The control implementation.

title str or None

The title or tooltip of the control.

disabled bool

Specifies if the control is disabled (form:disabled). Default is False.

printable bool

Specifies if the control is printable (form:printable). Default is True.

tab_stop bool

Specifies if the control is a tab stop (form:tab-stop). Default is True.

tab_index int or None

The tab order of the control (form:tab-index). Default is 0.

readonly bool

Specifies if the control is read-only (form:readonly). Default is False.

convert_empty_to_null bool

Specifies if an empty value is converted to null (form:convert-empty-to-null). Default is False.

current_value str or None

The current value of the control (form:current-value).

data_field str or None

The data field used for storing the value.

linked_cell str or None

The linked spreadsheet cell.

max_length int or None

The maximum number of characters allowed (form:max-length).

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormText, “form:text”.

__str__
Source code in odfdo/form_controls.py
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
class FormText(FormAsDictMixin, FormMaxLengthMixin, FormGrid):
    """A control for displaying and inputting text on a single line, "form:text".

    Attributes:
        name (str or None): The name of the control (form:name).
        value (str or None): The value of the control.
        control_implementation (str or None): The control implementation.
        title (str or None): The title or tooltip of the control.
        disabled (bool): Specifies if the control is disabled (form:disabled). Default is False.
        printable (bool): Specifies if the control is printable (form:printable). Default is True.
        tab_stop (bool): Specifies if the control is a tab stop (form:tab-stop). Default is True.
        tab_index (int or None): The tab order of the control (form:tab-index). Default is 0.
        readonly (bool): Specifies if the control is read-only (form:readonly). Default is False.
        convert_empty_to_null (bool): Specifies if an empty value is converted to null (form:convert-empty-to-null). Default is False.
        current_value (str or None): The current value of the control (form:current-value).
        data_field (str or None): The data field used for storing the value.
        linked_cell (str or None): The linked spreadsheet cell.
        max_length (int or None): The maximum number of characters allowed (form:max-length).
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:text"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("value", "form:value"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDefBool("readonly", "form:readonly", False),
        PropDefBool("convert_empty_to_null", "form:convert-empty-to-null", False),
        PropDef("current_value", "form:current-value"),
        PropDef("data_field", "form:data-field"),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        title: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        readonly: bool | None = None,
        convert_empty_to_null: bool | None = None,
        current_value: str | None = None,
        data_field: str | None = None,
        linked_cell: str | None = None,
        max_length: int | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormText, "form:text".

        The "form:text" element is usable within the following elements:
        "form:column" and "form:form".

        Args:
            name: The name of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            title: The title or tooltip.
            disabled: Specifies if the control is disabled.
            printable: Specifies if the control is printable.
            tab_index: The tab order of the control.
            tab_stop: Specifies if the control is a tab stop.
            readonly: Specifies if the control is read-only.
            convert_empty_to_null: Specifies if an empty value is converted to null.
            current_value: The current value of the control.
            data_field: The data field used for storing the value.
            linked_cell: The linked spreadsheet cell.
            max_length: The maximum number of characters allowed.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            title=title,
            disabled=disabled,
            printable=printable,
            tab_index=tab_index,
            tab_stop=tab_stop,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if value is not None:
                self.value = value
            if readonly is not None:
                self.readonly = readonly
            if convert_empty_to_null is not None:
                self.convert_empty_to_null = convert_empty_to_null
            if current_value is not None:
                self.current_value = current_value
            if data_field is not None:
                self.data_field = data_field
            if linked_cell is not None:
                self.linked_cell = linked_cell
            if max_length is not None:
                self.max_length = max_length

    def __str__(self) -> str:
        if self.current_value is not None:
            return self.current_value or ""
        return self.value or ""

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef("value", "form:value"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDefBool("readonly", "form:readonly", False),
    PropDefBool(
        "convert_empty_to_null",
        "form:convert-empty-to-null",
        False,
    ),
    PropDef("current_value", "form:current-value"),
    PropDef("data_field", "form:data-field"),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:text'

convert_empty_to_null instance-attribute

convert_empty_to_null = convert_empty_to_null

current_value instance-attribute

current_value = current_value

data_field instance-attribute

data_field = data_field

linked_cell instance-attribute

linked_cell = linked_cell

max_length instance-attribute

max_length = max_length

readonly instance-attribute

readonly = readonly

value instance-attribute

value = value

__init__

__init__(
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormText, “form:text”.

The “form:text” element is usable within the following elements: “form:column” and “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip.

None
disabled bool | None

Specifies if the control is disabled.

None
printable bool | None

Specifies if the control is printable.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

Specifies if the control is a tab stop.

None
readonly bool | None

Specifies if the control is read-only.

None
convert_empty_to_null bool | None

Specifies if an empty value is converted to null.

None
current_value str | None

The current value of the control.

None
data_field str | None

The data field used for storing the value.

None
linked_cell str | None

The linked spreadsheet cell.

None
max_length int | None

The maximum number of characters allowed.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
def __init__(
    self,
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormText, "form:text".

    The "form:text" element is usable within the following elements:
    "form:column" and "form:form".

    Args:
        name: The name of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        title: The title or tooltip.
        disabled: Specifies if the control is disabled.
        printable: Specifies if the control is printable.
        tab_index: The tab order of the control.
        tab_stop: Specifies if the control is a tab stop.
        readonly: Specifies if the control is read-only.
        convert_empty_to_null: Specifies if an empty value is converted to null.
        current_value: The current value of the control.
        data_field: The data field used for storing the value.
        linked_cell: The linked spreadsheet cell.
        max_length: The maximum number of characters allowed.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        title=title,
        disabled=disabled,
        printable=printable,
        tab_index=tab_index,
        tab_stop=tab_stop,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if value is not None:
            self.value = value
        if readonly is not None:
            self.readonly = readonly
        if convert_empty_to_null is not None:
            self.convert_empty_to_null = convert_empty_to_null
        if current_value is not None:
            self.current_value = current_value
        if data_field is not None:
            self.data_field = data_field
        if linked_cell is not None:
            self.linked_cell = linked_cell
        if max_length is not None:
            self.max_length = max_length

__str__

__str__() -> str
Source code in odfdo/form_controls.py
436
437
438
439
def __str__(self) -> str:
    if self.current_value is not None:
        return self.current_value or ""
    return self.value or ""

FormTextarea

Bases: FormText

A control for displaying and inputting text on multiple lines, “form:textarea”.

The “form:textarea” element may be used with plain-text values (specified by the form:current-value attribute) as well as with formatted text (specified as paragraph content). If both a form:current-value attribute and one or more “text:p” elements are present, it is implementation-dependent which text is used.

The odfdo implementation returns str(self), fixme

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

value str or None

The value of the control.

control_implementation str or None

The control implementation.

title str or None

The title or tooltip of the control.

disabled bool

Specifies if the control is disabled (form:disabled). Default is False.

printable bool

Specifies if the control is printable (form:printable). Default is True.

tab_stop bool

Specifies if the control is a tab stop (form:tab-stop). Default is True.

tab_index int or None

The tab order of the control (form:tab-index). Default is 0.

readonly bool

Specifies if the control is read-only (form:readonly). Default is False.

convert_empty_to_null bool

Specifies if an empty value is converted to null (form:convert-empty-to-null). Default is False.

current_value str or None

The current value of the control (form:current-value).

data_field str or None

The data field used for storing the value.

linked_cell str or None

The linked spreadsheet cell.

max_length int or None

The maximum number of characters allowed (form:max-length).

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormTextarea, “form:textarea”.

__str__
Source code in odfdo/form_controls.py
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
class FormTextarea(FormText):
    """A control for displaying and inputting text on multiple lines,
    "form:textarea".

    The "form:textarea" element may be used with plain-text values
    (specified by the form:current-value attribute) as well as with formatted
    text (specified as paragraph content). If both a form:current-value
    attribute and one or more "text:p" elements are present, it is
    implementation-dependent which text is used.

    The odfdo implementation returns str(self), fixme

    Attributes:
        name (str or None): The name of the control (form:name).
        value (str or None): The value of the control.
        control_implementation (str or None): The control implementation.
        title (str or None): The title or tooltip of the control.
        disabled (bool): Specifies if the control is disabled (form:disabled). Default is False.
        printable (bool): Specifies if the control is printable (form:printable). Default is True.
        tab_stop (bool): Specifies if the control is a tab stop (form:tab-stop). Default is True.
        tab_index (int or None): The tab order of the control (form:tab-index). Default is 0.
        readonly (bool): Specifies if the control is read-only (form:readonly). Default is False.
        convert_empty_to_null (bool): Specifies if an empty value is converted to null (form:convert-empty-to-null). Default is False.
        current_value (str or None): The current value of the control (form:current-value).
        data_field (str or None): The data field used for storing the value.
        linked_cell (str or None): The linked spreadsheet cell.
        max_length (int or None): The maximum number of characters allowed (form:max-length).
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:textarea"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("value", "form:value"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDefBool("readonly", "form:readonly", False),
        PropDefBool("convert_empty_to_null", "form:convert-empty-to-null", False),
        PropDef("current_value", "form:current-value"),
        PropDef("data_field", "form:data-field"),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated#
    )

    def __init__(
        self,
        name: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        title: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        readonly: bool | None = None,
        convert_empty_to_null: bool | None = None,
        current_value: str | None = None,
        data_field: str | None = None,
        linked_cell: str | None = None,
        max_length: int | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormTextarea, "form:textarea".

        The "form:textarea" element is usable within the following elements:
        "form:column" and "form:form".

        Args:
            name: The name of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            title: The title or tooltip.
            disabled: Specifies if the control is disabled.
            printable: Specifies if the control is printable.
            tab_index: The tab order of the control.
            tab_stop: Specifies if the control is a tab stop.
            readonly: Specifies if the control is read-only.
            convert_empty_to_null: Specifies if an empty value is converted to null.
            current_value: The current value of the control.
            data_field: The data field used for storing the value.
            linked_cell: The linked spreadsheet cell.
            max_length: The maximum number of characters allowed.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            value=value,
            control_implementation=control_implementation,
            title=title,
            disabled=disabled,
            printable=printable,
            tab_index=tab_index,
            tab_stop=tab_stop,
            readonly=readonly,
            convert_empty_to_null=convert_empty_to_null,
            current_value=current_value,
            data_field=data_field,
            linked_cell=linked_cell,
            max_length=max_length,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )

    def __str__(self) -> str:
        return self.inner_text

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef("value", "form:value"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDefBool("readonly", "form:readonly", False),
    PropDefBool(
        "convert_empty_to_null",
        "form:convert-empty-to-null",
        False,
    ),
    PropDef("current_value", "form:current-value"),
    PropDef("data_field", "form:data-field"),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:textarea'

__init__

__init__(
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormTextarea, “form:textarea”.

The “form:textarea” element is usable within the following elements: “form:column” and “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip.

None
disabled bool | None

Specifies if the control is disabled.

None
printable bool | None

Specifies if the control is printable.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

Specifies if the control is a tab stop.

None
readonly bool | None

Specifies if the control is read-only.

None
convert_empty_to_null bool | None

Specifies if an empty value is converted to null.

None
current_value str | None

The current value of the control.

None
data_field str | None

The data field used for storing the value.

None
linked_cell str | None

The linked spreadsheet cell.

None
max_length int | None

The maximum number of characters allowed.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
def __init__(
    self,
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormTextarea, "form:textarea".

    The "form:textarea" element is usable within the following elements:
    "form:column" and "form:form".

    Args:
        name: The name of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        title: The title or tooltip.
        disabled: Specifies if the control is disabled.
        printable: Specifies if the control is printable.
        tab_index: The tab order of the control.
        tab_stop: Specifies if the control is a tab stop.
        readonly: Specifies if the control is read-only.
        convert_empty_to_null: Specifies if an empty value is converted to null.
        current_value: The current value of the control.
        data_field: The data field used for storing the value.
        linked_cell: The linked spreadsheet cell.
        max_length: The maximum number of characters allowed.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        value=value,
        control_implementation=control_implementation,
        title=title,
        disabled=disabled,
        printable=printable,
        tab_index=tab_index,
        tab_stop=tab_stop,
        readonly=readonly,
        convert_empty_to_null=convert_empty_to_null,
        current_value=current_value,
        data_field=data_field,
        linked_cell=linked_cell,
        max_length=max_length,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )

__str__

__str__() -> str
Source code in odfdo/form_controls.py
562
563
def __str__(self) -> str:
    return self.inner_text

FormTime

Bases: FormDelayRepeatMixin, FormText

A control for inputting time data, “form:time”.

Attributes:

Name Type Description
name str or None

The name of the control (form:name).

value str or None

The value of the control (form:value).

control_implementation str or None

The control implementation (form:control-implementation).

title str or None

The title or tooltip of the control (form:title).

disabled bool

Specifies if the control is disabled (form:disabled).

printable bool

Specifies if the control is printable (form:printable).

tab_stop bool

Specifies if the control is a tab stop (form:tab-stop).

readonly bool

Specifies if the control is read-only (form:readonly).

convert_empty_to_null bool

Specifies if an empty value is converted to null (form:convert-empty-to-null).

current_value str or None

The current value of the control (form:current-value).

data_field str or None

The data field used for storing the value (form:data-field).

repeat bool or None

Specifies if the control repeats when a button is clicked (form:repeat).

linked_cell str or None

The linked spreadsheet cell (form:linked-cell).

min_value str or None

The minimum time value allowed (form:min-value).

max_value str or None

The maximum time value allowed (form:max-value).

spin_button bool

Specifies if a spin button is available (form:spin-button).

xml_id str or None

The unique XML ID (xml:id).

xforms_bind str or None

The XForms bind expression (xforms:bind).

form_id str or None

The form ID (deprecated, form:id).

tab_index int or None

The tab order of the control (form:tab-index).

max_length int or None

The maximum number of characters allowed (form:max-length).

delay_for_repeat str or None

The delay for repeating the action (form:delay-for-repeat).

Methods:

Name Description
__init__

Create a FormTime, “form:time”.

Source code in odfdo/form_controls.py
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
class FormTime(FormDelayRepeatMixin, FormText):
    """A control for inputting time data, "form:time".

    Attributes:
        name (str or None): The name of the control (form:name).
        value (str or None): The value of the control (form:value).
        control_implementation (str or None): The control implementation (form:control-implementation).
        title (str or None): The title or tooltip of the control (form:title).
        disabled (bool): Specifies if the control is disabled (form:disabled).
        printable (bool): Specifies if the control is printable (form:printable).
        tab_stop (bool): Specifies if the control is a tab stop (form:tab-stop).
        readonly (bool): Specifies if the control is read-only (form:readonly).
        convert_empty_to_null (bool): Specifies if an empty value is converted to null (form:convert-empty-to-null).
        current_value (str or None): The current value of the control (form:current-value).
        data_field (str or None): The data field used for storing the value (form:data-field).
        repeat (bool or None): Specifies if the control repeats when a button is clicked (form:repeat).
        linked_cell (str or None): The linked spreadsheet cell (form:linked-cell).
        min_value (str or None): The minimum time value allowed (form:min-value).
        max_value (str or None): The maximum time value allowed (form:max-value).
        spin_button (bool): Specifies if a spin button is available (form:spin-button).
        xml_id (str or None): The unique XML ID (xml:id).
        xforms_bind (str or None): The XForms bind expression (xforms:bind).
        form_id (str or None): The form ID (deprecated, form:id).
        tab_index (int or None): The tab order of the control (form:tab-index).
        max_length (int or None): The maximum number of characters allowed (form:max-length).
        delay_for_repeat (str or None): The delay for repeating the action (form:delay-for-repeat).
    """

    _tag = "form:time"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("name", "form:name"),
        PropDef("value", "form:value"),
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("title", "form:title"),
        PropDefBool("disabled", "form:disabled", False),
        PropDefBool("printable", "form:printable", True),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDefBool("readonly", "form:readonly", False),
        PropDefBool("convert_empty_to_null", "form:convert-empty-to-null", False),
        PropDef("current_value", "form:current-value"),
        PropDef("data_field", "form:data-field"),
        PropDef("repeat", "form:repeat"),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("min_value", "form:min-value"),
        PropDef("max_value", "form:max-value"),
        PropDefBool("spin_button", "form:spin-button", False),
        PropDef("xml_id", "xml:id"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        title: str | None = None,
        disabled: bool | None = None,
        printable: bool | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        readonly: bool | None = None,
        convert_empty_to_null: bool | None = None,
        current_value: str | None = None,
        data_field: str | None = None,
        repeat: bool | None = None,
        delay_for_repeat: str | None = None,
        linked_cell: str | None = None,
        max_length: int | None = None,
        min_value: str | None = None,
        max_value: str | None = None,
        spin_button: bool | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormTime, "form:time".

        The "form:time" element is usable within the following elements:
        "form:column" and "form:form".

        Args:
            name: The name of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            title: The title or tooltip of the control.
            disabled: If True, the control is disabled.
            printable: If True, the control is printable.
            tab_index: The tab order of the control.
            tab_stop: If True, the control is a tab stop.
            readonly: If True, the control is read-only.
            convert_empty_to_null: If True, an empty value is converted to null.
            current_value: The current value of the control.
            data_field: The data field for storing the value.
            repeat: If True, the control repeats when a button is clicked.
            delay_for_repeat: The delay for repeating the action. Defaults to "PT0.050S".
            linked_cell: The linked spreadsheet cell.
            max_length: The maximum number of characters allowed.
            min_value: The minimum value allowed.
            max_value: The maximum value allowed.
            spin_button: If True, a spin button is available.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            control_implementation=control_implementation,
            title=title,
            value=value,
            disabled=disabled,
            printable=printable,
            readonly=readonly,
            convert_empty_to_null=convert_empty_to_null,
            current_value=current_value,
            data_field=data_field,
            linked_cell=linked_cell,
            tab_index=tab_index,
            tab_stop=tab_stop,
            max_length=max_length,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if repeat is not None:
                self.repeat = repeat
            if delay_for_repeat is not None:
                self.delay_for_repeat = delay_for_repeat
            if min_value is not None:
                self.min_value = min_value
            if max_value is not None:
                self.max_value = max_value
            if spin_button is not None:
                self.spin_button = spin_button

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef("name", "form:name"),
    PropDef("value", "form:value"),
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("title", "form:title"),
    PropDefBool("disabled", "form:disabled", False),
    PropDefBool("printable", "form:printable", True),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDefBool("readonly", "form:readonly", False),
    PropDefBool(
        "convert_empty_to_null",
        "form:convert-empty-to-null",
        False,
    ),
    PropDef("current_value", "form:current-value"),
    PropDef("data_field", "form:data-field"),
    PropDef("repeat", "form:repeat"),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("min_value", "form:min-value"),
    PropDef("max_value", "form:max-value"),
    PropDefBool("spin_button", "form:spin-button", False),
    PropDef("xml_id", "xml:id"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:time'

delay_for_repeat instance-attribute

delay_for_repeat = delay_for_repeat

max_value instance-attribute

max_value = max_value

min_value instance-attribute

min_value = min_value

repeat instance-attribute

repeat = repeat

spin_button instance-attribute

spin_button = spin_button

__init__

__init__(
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    repeat: bool | None = None,
    delay_for_repeat: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    min_value: str | None = None,
    max_value: str | None = None,
    spin_button: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormTime, “form:time”.

The “form:time” element is usable within the following elements: “form:column” and “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
title str | None

The title or tooltip of the control.

None
disabled bool | None

If True, the control is disabled.

None
printable bool | None

If True, the control is printable.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

If True, the control is a tab stop.

None
readonly bool | None

If True, the control is read-only.

None
convert_empty_to_null bool | None

If True, an empty value is converted to null.

None
current_value str | None

The current value of the control.

None
data_field str | None

The data field for storing the value.

None
repeat bool | None

If True, the control repeats when a button is clicked.

None
delay_for_repeat str | None

The delay for repeating the action. Defaults to “PT0.050S”.

None
linked_cell str | None

The linked spreadsheet cell.

None
max_length int | None

The maximum number of characters allowed.

None
min_value str | None

The minimum value allowed.

None
max_value str | None

The maximum value allowed.

None
spin_button bool | None

If True, a spin button is available.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
def __init__(
    self,
    name: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    title: str | None = None,
    disabled: bool | None = None,
    printable: bool | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    readonly: bool | None = None,
    convert_empty_to_null: bool | None = None,
    current_value: str | None = None,
    data_field: str | None = None,
    repeat: bool | None = None,
    delay_for_repeat: str | None = None,
    linked_cell: str | None = None,
    max_length: int | None = None,
    min_value: str | None = None,
    max_value: str | None = None,
    spin_button: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormTime, "form:time".

    The "form:time" element is usable within the following elements:
    "form:column" and "form:form".

    Args:
        name: The name of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        title: The title or tooltip of the control.
        disabled: If True, the control is disabled.
        printable: If True, the control is printable.
        tab_index: The tab order of the control.
        tab_stop: If True, the control is a tab stop.
        readonly: If True, the control is read-only.
        convert_empty_to_null: If True, an empty value is converted to null.
        current_value: The current value of the control.
        data_field: The data field for storing the value.
        repeat: If True, the control repeats when a button is clicked.
        delay_for_repeat: The delay for repeating the action. Defaults to "PT0.050S".
        linked_cell: The linked spreadsheet cell.
        max_length: The maximum number of characters allowed.
        min_value: The minimum value allowed.
        max_value: The maximum value allowed.
        spin_button: If True, a spin button is available.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        control_implementation=control_implementation,
        title=title,
        value=value,
        disabled=disabled,
        printable=printable,
        readonly=readonly,
        convert_empty_to_null=convert_empty_to_null,
        current_value=current_value,
        data_field=data_field,
        linked_cell=linked_cell,
        tab_index=tab_index,
        tab_stop=tab_stop,
        max_length=max_length,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if repeat is not None:
            self.repeat = repeat
        if delay_for_repeat is not None:
            self.delay_for_repeat = delay_for_repeat
        if min_value is not None:
            self.min_value = min_value
        if max_value is not None:
            self.max_value = max_value
        if spin_button is not None:
            self.spin_button = spin_button

FormValueRange

Bases: FormDelayRepeatMixin, FormGrid

A control which allows the user to select a value from a number range, “form:value-range”.

Attributes:

Name Type Description
control_implementation str or None

The control implementation.

delay_for_repeat str or None

The delay for repeating the action.

disabled bool

If True, the control is disabled.

id str or None

The unique XML ID (form:id).

linked_cell str or None

The linked spreadsheet cell.

max_value str or None

The maximum value allowed.

min_value str or None

The minimum value allowed.

name str or None

The name of the control.

orientation str or None

The orientation of the control.

page_step_size str or None

The page step size.

printable bool

If True, the control is printable.

repeat bool

If True, the control repeats when a button is clicked.

step_size str or None

The step size.

tab_index int or None

The tab order of the control.

tab_stop bool

If True, the control is a tab stop.

title str or None

The title or tooltip of the control.

value str or None

The value of the control.

xforms_bind str or None

The XForms bind expression.

xml_id str or None

The unique XML ID.

form_id str or None

The form ID (deprecated).

Methods:

Name Description
__init__

Create a FormValueRange, “form:value-range”.

Source code in odfdo/form_controls.py
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
class FormValueRange(FormDelayRepeatMixin, FormGrid):
    """A control which allows the user to select a value from a number range,
    "form:value-range".

    Attributes:
        control_implementation (str or None): The control implementation.
        delay_for_repeat (str or None): The delay for repeating the action.
        disabled (bool): If True, the control is disabled.
        id (str or None): The unique XML ID (form:id).
        linked_cell (str or None): The linked spreadsheet cell.
        max_value (str or None): The maximum value allowed.
        min_value (str or None): The minimum value allowed.
        name (str or None): The name of the control.
        orientation (str or None): The orientation of the control.
        page_step_size (str or None): The page step size.
        printable (bool): If True, the control is printable.
        repeat (bool): If True, the control repeats when a button is clicked.
        step_size (str or None): The step size.
        tab_index (int or None): The tab order of the control.
        tab_stop (bool): If True, the control is a tab stop.
        title (str or None): The title or tooltip of the control.
        value (str or None): The value of the control.
        xforms_bind (str or None): The XForms bind expression.
        xml_id (str or None): The unique XML ID.
        form_id (str or None): The form ID (deprecated).
    """

    _tag = "form:value-range"
    _properties: tuple[PropDef | PropDefBool, ...] = (
        PropDef("control_implementation", "form:control-implementation"),
        PropDef("delay_for_repeat", "form:delay-for-repeat"),
        PropDefBool("disabled", "form:disabled", False),
        PropDef("linked_cell", "form:linked-cell"),
        PropDef("max_value", "form:max-value"),
        PropDef("min_value", "form:min-value"),
        PropDef("name", "form:name"),
        PropDef("orientation", "form:orientation"),
        PropDef("page_step_size", "form:page-step-size"),
        PropDefBool("printable", "form:printable", True),
        PropDef("repeat", "form:repeat"),
        PropDef("step_size", "form:step-size"),
        PropDefBool("tab_stop", "form:tab-stop", True),
        PropDef("title", "form:title"),
        PropDef("value", "form:value"),
        PropDef("xforms_bind", "xforms:bind"),
        PropDef("xml_id", "xml:id"),
        PropDef("form_id", "form:id"),  # deprecated
    )

    def __init__(
        self,
        name: str | None = None,
        title: str | None = None,
        value: str | None = None,
        control_implementation: str | None = None,
        delay_for_repeat: str | None = None,
        disabled: bool | None = None,
        linked_cell: str | None = None,
        max_value: str | None = None,
        min_value: str | None = None,
        orientation: str | None = None,
        page_step_size: str | None = None,
        printable: bool | None = None,
        repeat: bool | None = None,
        step_size: str | None = None,
        tab_index: int | None = None,
        tab_stop: bool | None = None,
        xml_id: str | None = None,
        xforms_bind: str | None = None,
        form_id: str | None = None,
        **kwargs: Any,
    ) -> None:
        """Create a FormValueRange, "form:value-range".

        The "form:value-range" element is usable within the following element:
        "form:form".

        Args:
            name: The name of the control.
            title: The title or tooltip of the control.
            value: The value of the control.
            control_implementation: The control implementation.
            delay_for_repeat: The delay for repeating the action.
            disabled: If True, the control is disabled.
            linked_cell: The linked spreadsheet cell.
            max_value: The maximum value allowed.
            min_value: The minimum value allowed.
            orientation: The orientation of the control.
            page_step_size: The page step size.
            printable: If True, the control is printable.
            repeat: If True, the control repeats when a button is clicked.
            step_size: The step size.
            tab_index: The tab order of the control.
            tab_stop: If True, the control is a tab stop.
            xml_id: The unique XML ID.
            xforms_bind: The XForms bind expression.
            form_id: The form ID (deprecated).
        """
        super().__init__(
            name=name,
            title=title,
            control_implementation=control_implementation,
            disabled=disabled,
            printable=printable,
            tab_index=tab_index,
            tab_stop=tab_stop,
            xml_id=xml_id,
            xforms_bind=xforms_bind,
            form_id=form_id,
            **kwargs,
        )
        if self._do_init:
            if delay_for_repeat is not None:
                self.delay_for_repeat = delay_for_repeat
            if linked_cell is not None:
                self.linked_cell = linked_cell
            if max_value is not None:
                self.max_value = max_value
            if min_value is not None:
                self.min_value = min_value
            if orientation is not None:
                self.orientation = orientation
            if page_step_size is not None:
                self.page_step_size = page_step_size
            if repeat is not None:
                self.repeat = repeat
            if step_size is not None:
                self.step_size = step_size
            if value is not None:
                self.value = value

_properties class-attribute instance-attribute

_properties: tuple[PropDef | PropDefBool, ...] = (
    PropDef(
        "control_implementation",
        "form:control-implementation",
    ),
    PropDef("delay_for_repeat", "form:delay-for-repeat"),
    PropDefBool("disabled", "form:disabled", False),
    PropDef("linked_cell", "form:linked-cell"),
    PropDef("max_value", "form:max-value"),
    PropDef("min_value", "form:min-value"),
    PropDef("name", "form:name"),
    PropDef("orientation", "form:orientation"),
    PropDef("page_step_size", "form:page-step-size"),
    PropDefBool("printable", "form:printable", True),
    PropDef("repeat", "form:repeat"),
    PropDef("step_size", "form:step-size"),
    PropDefBool("tab_stop", "form:tab-stop", True),
    PropDef("title", "form:title"),
    PropDef("value", "form:value"),
    PropDef("xforms_bind", "xforms:bind"),
    PropDef("xml_id", "xml:id"),
    PropDef("form_id", "form:id"),
)

_tag class-attribute instance-attribute

_tag = 'form:value-range'

delay_for_repeat instance-attribute

delay_for_repeat = delay_for_repeat

linked_cell instance-attribute

linked_cell = linked_cell

max_value instance-attribute

max_value = max_value

min_value instance-attribute

min_value = min_value

orientation instance-attribute

orientation = orientation

page_step_size instance-attribute

page_step_size = page_step_size

repeat instance-attribute

repeat = repeat

step_size instance-attribute

step_size = step_size

value instance-attribute

value = value

__init__

__init__(
    name: str | None = None,
    title: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    delay_for_repeat: str | None = None,
    disabled: bool | None = None,
    linked_cell: str | None = None,
    max_value: str | None = None,
    min_value: str | None = None,
    orientation: str | None = None,
    page_step_size: str | None = None,
    printable: bool | None = None,
    repeat: bool | None = None,
    step_size: str | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None

Create a FormValueRange, “form:value-range”.

The “form:value-range” element is usable within the following element: “form:form”.

Parameters:

Name Type Description Default
name str | None

The name of the control.

None
title str | None

The title or tooltip of the control.

None
value str | None

The value of the control.

None
control_implementation str | None

The control implementation.

None
delay_for_repeat str | None

The delay for repeating the action.

None
disabled bool | None

If True, the control is disabled.

None
linked_cell str | None

The linked spreadsheet cell.

None
max_value str | None

The maximum value allowed.

None
min_value str | None

The minimum value allowed.

None
orientation str | None

The orientation of the control.

None
page_step_size str | None

The page step size.

None
printable bool | None

If True, the control is printable.

None
repeat bool | None

If True, the control repeats when a button is clicked.

None
step_size str | None

The step size.

None
tab_index int | None

The tab order of the control.

None
tab_stop bool | None

If True, the control is a tab stop.

None
xml_id str | None

The unique XML ID.

None
xforms_bind str | None

The XForms bind expression.

None
form_id str | None

The form ID (deprecated).

None
Source code in odfdo/form_controls.py
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
def __init__(
    self,
    name: str | None = None,
    title: str | None = None,
    value: str | None = None,
    control_implementation: str | None = None,
    delay_for_repeat: str | None = None,
    disabled: bool | None = None,
    linked_cell: str | None = None,
    max_value: str | None = None,
    min_value: str | None = None,
    orientation: str | None = None,
    page_step_size: str | None = None,
    printable: bool | None = None,
    repeat: bool | None = None,
    step_size: str | None = None,
    tab_index: int | None = None,
    tab_stop: bool | None = None,
    xml_id: str | None = None,
    xforms_bind: str | None = None,
    form_id: str | None = None,
    **kwargs: Any,
) -> None:
    """Create a FormValueRange, "form:value-range".

    The "form:value-range" element is usable within the following element:
    "form:form".

    Args:
        name: The name of the control.
        title: The title or tooltip of the control.
        value: The value of the control.
        control_implementation: The control implementation.
        delay_for_repeat: The delay for repeating the action.
        disabled: If True, the control is disabled.
        linked_cell: The linked spreadsheet cell.
        max_value: The maximum value allowed.
        min_value: The minimum value allowed.
        orientation: The orientation of the control.
        page_step_size: The page step size.
        printable: If True, the control is printable.
        repeat: If True, the control repeats when a button is clicked.
        step_size: The step size.
        tab_index: The tab order of the control.
        tab_stop: If True, the control is a tab stop.
        xml_id: The unique XML ID.
        xforms_bind: The XForms bind expression.
        form_id: The form ID (deprecated).
    """
    super().__init__(
        name=name,
        title=title,
        control_implementation=control_implementation,
        disabled=disabled,
        printable=printable,
        tab_index=tab_index,
        tab_stop=tab_stop,
        xml_id=xml_id,
        xforms_bind=xforms_bind,
        form_id=form_id,
        **kwargs,
    )
    if self._do_init:
        if delay_for_repeat is not None:
            self.delay_for_repeat = delay_for_repeat
        if linked_cell is not None:
            self.linked_cell = linked_cell
        if max_value is not None:
            self.max_value = max_value
        if min_value is not None:
            self.min_value = min_value
        if orientation is not None:
            self.orientation = orientation
        if page_step_size is not None:
            self.page_step_size = page_step_size
        if repeat is not None:
            self.repeat = repeat
        if step_size is not None:
            self.step_size = step_size
        if value is not None:
            self.value = value