Hello there.
A little background: I’m trying to create a series of document templates for internal use with a cover sheet containing a number of input fields where the content is then automatically propagated to the header and footer of each page in the document.
I’ve already created a suitable template in MS Word using custom controls and XML mapping to allow easy metadata extraction using our document management system, but since LibreOffice only has rudimentary custom control support and no Word-compatible XML mapping support, the template naturally doesn’t function in LibreOffice properly.
As such, we’ve decided to create a separate LibreOffice template for our LibreOffice users. I’ve managed to implement the free-form text input fields using the legacy input fields/user fields and it works fine, but there are also a number of date and drop-down fields, and these are where I’m having a problem.
(Just a quick mention of the fact that I cannot use macros for policy reasons, and I also cannot use database connections as this template needs to be usable even outside of the network.)
As I see it, there are three ways to implement this:
-
Variable fields: Free-form input fields work well in this case as I can simply add user fields with the requisite variables in the headers and footers and then the corresponding input fields in the cover sheet form. However, this functionality fails when trying to implement input fields as the field only accepts text or integer values and thus only accepts a date entered as the number of days relative to the epoch date 1899-12-30. Drop-down menus are apparently not possible here.
-
Function fields: Free-form input fields are possible, but I can find no way to create a user field that displays the content of this field. Drop-down lists are possible, but I have the same problem that I can’t find a way to reproduce the selected content elsewhere in the document. Dates don’t seem to be possible using functions.
-
Content controls: Free-form, date, and drop-down input fields work perfectly (and are my preferred implementation), but LibreOffice doesn’t seem to provide any documented way to access the inputs in the content controls. In MS Word they would be mapped to a field in a defined XML schema and a second content control elsewhere in the document but mapped to the same field would “pick up” the content via the shared mapping. But because LibreOffice doesn’t support XML mapping of content controls, the fields are basically just there with no apparent or documented way to cross-reference them elsewhere in the file. The documentation suggests that the tag can be used as a machine-readable identifier for external programs, which would be helpful for our document management, but I still need to reference the fields from within the document.
Does anyone know how a consistent, user-friendly form can be implemented using any of these three systems with free-form text, date, and drop-down input support and the ability to propagate field input to other parts of the document? I’d appreciate any ideas that anyone might have. Many thanks in advance!