Form controls in LibreOffice

    From The Document Foundation Wiki


    Definitions

    Form control: An element that can be part of a form. For example: checkbox, option button, input field.
    Text based form control: this type of form control is part of the text flow. It is also called form field.
    Floating object type form control: this type of form control is not part of the text flow, can be moved around independently.
    Legacy control: Microsoft Office specific, text based form control. There are only three types: Text form field, CheckBox form field, and DropDown form field.
    ActiveX control: Microsoft Office specific, floating object type form control.
    Content control: Microsoft Office specific, text based form control.

    Interoperability problem

    While in Microsoft Office there are three types of form controls (Legacy, ActiveX, Content control), from the functionality point of view there are only two types.

    The floating object type form controls are not part of the text flow, they are like a frame or image, they can be moved and resized freely. ActiveX controls and LibreOffice form controls belong here. There are interoperability problem with these controls, such as Microsoft Office and LibreOffice positions these controls differently. There is also a disadvantage with this type of controls. It is not possible to put bookmarks around the controls, therefore their content cannot be used/referenced elsewhere in the document. The user can switch between editing and filling out the form with Edit mode.

    On the other hand, the text based form controls are part of the text flow. Legacy controls and Content controls of Microsoft Office belong here. From the functionality point of view, Legacy controls and Content controls are very similar. The Legacy controls are older, and they were renewed as Content controls later. These controls can be bookmarked, protected with password, or selectively protected (part of document), which is not possible with floating object type form controls. The user can switch between editing and filling out the form with Restrict Editing (Microsoft Office) or Protect Form (LibreOffice). Until LibreOffice 6.3 text based form controls had limited support. Only import/export worked and the form could be filled out, but the properties could not be set and it was not possible to insert a new control.

    What's new in LibreOffice 6.3

    This improved a lot in LibreOffice 6.3. The decision dilemma was whether to implement Legacy controls or Content controls first. The two types have a lot in common, so implementing both at the same time would have not added much more to LibreOffice. The Content controls are the new concept, and easier to insert them in Microsoft Office, on the other hand:

    1. Legacy controls are supported in binary DOC format, too. Content controls are lost, when saved to DOC.
    2. Legacy documents rather contain Legacy controls.
    3. LibreOffice had better initial support of Legacy controls (DOC/DOCX export/import worked).

    Considering the above, support of Legacy controls was implemented/extended first. By default only the ActiveX-like LibreOffice form controls are available in the Form menu, but not all available form controls are interoperable with Microsoft Office. On Options – LibreOffice Writer – Compatibility dialog there is a setting under Global compatibility options: Reorganize Forms menu to have it MS compatible. When the setting is switched on, the Form menu contains only interoperable form controls in three groups.

    The Forms – Legacy Form Fields menu can be used to insert text form field, checkbox form field or dropdown form field to the document. Originally dropdown field in LibreOffice did not have a dropdown button next to the field, now there is one. Double click on a dropdown form field invokes a new dialog, where it is possible to specify the selectable items. For the other two form fields there is no properties dialog at the moment.

    Screenshots