Please view the guidelines
In-place editing of Input Fields
Purpose of this page is provide information on the solution for Issue 33737 . This information should serve the corresponding quality assurance efforts. It can be also used as the source to document the corresponding changes for the users.
Input Fields - three of a kind
We have three fields which are all named 'Input Field' in the user interface, but each has a different purpose.
These are Text Input Fields, User Variable Input Fields and Simple Variable Input Fields.
Currently no changes are made for Simple Variable Input Fields for solving Issue 33737 .
Text Input Field
This is a field to prompt the user for an input. The field has a description and its content holds the user's input.
In the OpenDocument file format (ODF) such a field is represented by ODF element <text:text-input>.
When importing Microsoft Word documents (binary file format, *.doc) Microsoft Word fields FILLIN and FORMTEXT are imported as Text Input Fields.
The user interface to create such a field is found in the Fields dialog (Menu - Insert - Fields - Others) on pane Functions. Here the user has to choose Type 'Input Field'.
User Variable Input Field
This is a field to prompt the user to set the value of a user variable. The value of a user variable is the same throughout the complete document.
In ODF such a field is represented by ODF element <text:user-field-input>.
Microsoft Word has support for so-called Document Variables. The value of such variables can be shown in a Microsoft Word document, but are created/deleted/set via Microsoft Word macro (aka Visual Basic). These Document Variables seem to be comparable with ODF's User Variables, but currently there is no mapping between these in OpenOffice. A User Variable Input Field is treated as Text Input Field when exporting an OpenOffice text document to the Microsoft Word binary format.
The user interface to create such a field is found in the Fields dialog on pane Variables. In advance the user has to create a user field. Then the user has to choose Type 'Input Field' and has to select the corresponding created user variable.
Simple Variable Input Field
This is a field to prompt the user to set the value of a simple variable. The value of a simple variable at a certain document position equals the value of the last set value - that is the difference to a user variable.
In ODF such a field is represented by ODF element <text:variable-input>.
For the Microsoft Word binary file format import/export filter these Simple Variable Input Fields are mapped to Microsoft Word ASK fields.
The user interface to create such a field is found in the Fields dialog on pane Variables. In advance the user has to create a simple variable. Then the user has to choose Type 'Input Field' and has to select the corresponding created simple variable.
Changes in detail
In the following the changes being in progress to solve Issue 33737 are given in detail. Currently the changes will only affect Text Input Fields and User Variable Input Fields. Thus, the following use of term Input Field denotes these two types of Input Fields.
Edit content of Input Fields
To modify/provide the content of an Input Field it is possible to directly perform the corresponding edit operations inside the document's text area. No additional popup dialog is needed.
As an Input Field can only contain text content most insertion operations are not allowed while the cursor is inside an Input Field. Also pasting operations and drop operations are not allowed. Pasting unformatted text (e.g. on Windows via SHIFT-CTRL-ALT-V) shall be possible.
Enter/Leaving Input Fields
To enable the user to enter respectively leave an Input Field special hidden characters are inserted for the cursor traveling. Thus, the cursor can be positioned before an Input Field and text can be inserted before the Input Field. After a cursor move to the right the Input Field is entered and text at the beginning of the Input Field can be inserted. Similar cursor traveling is possible at the end of the Input Field. The cursor can be placed right behind an Input Field and text can be inserted behind the Input Field. After a cursor move to the left the Input Field is entered and text at the end of the Input Field can be inserted.
TODO: provide screen shots
Entering and Leaving an Input Field will be indicated to the user by drawing a bounding rectangle around the Input Field when the cursor is inside the Input Field.
TODO: provide screen shots
Clicking with the mouse pointer into an Input Field will in general select its text content in order to enable the user to directly replace the Input Field's content.
Traveling between Input Fields
Traveling from one Input Field to the next respectively previous one with the keyboard is possible via TAB-Key respectively via SHIFT-TAB-Key. When traveling the complete content of the Input Field is selected.
To insert a TAB character inside an Input Field using the keyboard the CTRL-TAB-Key have to be used.
Selection of Input Fields
Any text selection inside an Input Fields is possible. When text outside an Input Field is part of a text selection only the complete Input Field can be added to the text selection. Thus, it is not possible to select a part of an Input Field's text content and other text content in one selection.
No Field Names for Input Fields
Field Names are no longer shown for Input Fields. Via Menu - View - Field Names the Field Names of all fields could be displayed instead of the fields content. This will no longer work for Input Fields due to the in-place editing.
Microsoft Word binary filter (WW8 filter)
In general Input Fields will be exported as Microsoft Word FORMTEXT fields.
Exceptions are imported Microsoft Word FILLIN fields - these will be exported as Microsoft Word FILLIN fields unless the Input Field's help text or tooltip text is filled.
Documents in read-only mode
Allow in-place editing of Input Fields when the document is in read-only mode. This is the same behavior as for text frames or sections for whose option to be editable in read-only mode has been set.
[more changes ?]
Areas which need high attention during testing
- Only text content shall be inserted into Input Fields.
- No formatting shall be possible inside Input Fields.
- Applying a formatting while the cursor is inside an Input Field shall be applied to the complete Input Field.
- No other attributes, like a hyperlink, a ruby, a page break or a column break, shall be possible inside Input Fields.
- The insertion of a 'New Paragraph' character or the key input of the ENTER-Key shall result into an insertion of a line break inside an Input Field.
- Undo/Redo actions regarding Input Fields.
- Functionality of other fields shall not be affected.
- Applying formatting or other attributes to text content.
- Save and Load of documents containing Input Fields.
- Exchange of documents containing Input Fields in ODF with previous OpenOffice versions.
- Exchange of documents containing Input Fields in Microsoft Word binary file format with Microsoft Word.
- HTML export and import of text documents containing Input Fields - assure no change to previous versions.
- [more areas?]