After inserting a File Selection control into a Writer form, it is not possible to explicitly associate the control with a previously created Label element.
Steps to Reproduce:
1. In a Writer document, enable Design Mode for forms and insert a Label element; in the Label's properties, fill in the "Label" field, e.g. "Upload a file that illustrates the issue in your bug report".
2. Insert a File Selection field.
3. Open the File Selection field's properties dialog to add a label.
The dialog's "General" tab does not contain the field "Label Field" that allows you to select a previously defined Label element. (And in the resulting XML code, there is consequently no explicit association between label and form field.)
The dialog's "General" should contain the field "Label Field" that allows you to select a previously defined Label element. This would be consistent with other fields, such as the Image Control field (which is similar in the sense that it also allows you to browse to a file) and other fields, such as a List Box, a Text Box, a Check Box and a Date Field.
Note that everything is in place in the XML code to allow an explicit association between label and form field: the <form:fixed-text> element (for the label) has a form:label attribute, and the <form:file> element has both an xml:id and a form:id attibute that can be referenced by a label. What is missing is the form:for attribute on the <form:fixed-text> element, which would point to the form field's ID to make the connection explicit.
User Profile Reset: No
Version: 18.104.22.168 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.5; UI render: default; VCL: kf5
Locale: en-GB (en_GB.utf8); UI: en-GB
Version: 22.214.171.124.alpha0+ / LibreOffice Community
Build ID: 7c1bad415ae48635dc67041c413bb7b76a530c22
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-07-05_06:55:03