Jump to content

Create a fillable form in Writer

From The Document Foundation Wiki

Foreword

The video "Ein ausfüllbares Formular erstellen in Writer - LibreOffice" ( "Create a fillable form") links to this page here for more information and details.

The document used in the video can be downloaded here.

Basis of this description is the Online Help Form Controls

Link to the video

Link to the video [in German DE]:

"Ein ausfüllbares Formular erstellen in Writer - LibreOffice"

Create a sales contract form

LibreOffice - Create a purchase contract as a fillable form in Writer as ODT and export to PDF for use.

Use existing document for the form

To show how to create a fillable form, you can take a ready-made ODT file Bill of sale about used item_V6.odt.

The captions and required text passages have already been created in this file.

The contained "framed boxes" are all tables.

Form Controls insert

In Writer you can now insert so-called Form Controls in the open file.

Form Controls are the fillable Fields in the document.

To do this you select the View ▸ Toolbars ▸ Form Controls menu and get the "Form Controls" toolbar.

Here the text field is often used - Example: Textfield.

"Form Controls" toolbar - Legend
No. Icon No. Icon No. Icon No. Icon
1 Select 8 Option Button 15 Nummeric Field 22 Image Control
2 Design Mode 9 List Box 16 Group Box 23 File Selection
3 Toggle Form Controls Wizards 10 Combo Box 17 Time Field 24 Spin Button
4 Form Design 11 Push Button 18 Currency Field 25 Scrollbar
5 Label 12 Image Button 19 Pattern Field
6 Text Box 13 Formatted Field 20 Table Control
7 Check Box 14 Date Field 21 Navigation Bar

Design Mode

The Form Controls toolbar has the Design Mode toggle icon .

This switches to the "Edit form fields" or "View form fields" work mode.

If the control icons are greyed out, click on "Design Mode" toggle.

Text box

Combinations for Text Box

To insert a Text Box into the form, click on the "Text Box" icon.

The cursor changes its appearance, becomes a crosshair with a small rectangle next to it.

You can position the crosshairs on the imaginary upper left corner of the Text Box to be created.

Click-hold-drag left mouse button to open a Text Box and then release.

The sidebar should be visible (the icon in the View ▸ Sidebar menu should be highlighted in light blue , otherwise click on it).

In the sidebar, click the "Sidebar Settings" icon to make the properties sidebar visible.

There the width and height of the Text Box can be adjusted, if the Text Box was raised and marked.

Doubleclick on the Text Box opens the "Text Box > Properties" dialog.

Here also the width and height can be set, as well as further specifications for the Text Box are made.

For our form we set the height of all Text Box to 0.60 cm.

The width is adapted to the circumstances.

For the given height of 0.60 cm the font "Calibri" and a font size of 9 pt are set.

In order to avoid having to adjust all values for the Text Box, we copy the inserted Text Box and insert the next placeholder.

For a clear assignment of the Text Box, the name of the Text Box should be changed (for example: Text Box 1, Text Box 2, Text Box 3, etc.).

So now all required Text Boxes are inserted and possibly even in width still adapted.

Here are the entries for the Text Boxes:

Entries for : Text field
1 bis 12
Text field
13 bis 16
Text field
17 bis 19
Text field
20 bis 22
Text field
23 bis 25
Text field
26
Text field
27 bis 29
Font Calibri Calibri Calibri Calibri Calibri Calibri Calibri
Font size 9 9 9 9 9 9 9
Text highlighting Default Default Default Default Default Default Default
Width 8,00 cm 13,60 cm 16,60 cm 16,60 cm 16,60 cm 13,60 cm 6,60 cm
Height 0,60 cm 0,60 cm 0,60 cm 0,60 cm 0,60 cm 0,60 cm 0,60 cm

Numeric Field

Click on the "Form Controls" toolbar on the symbol "Numeric Field" .

This is required for the stated EURO amounts (shown in numbers, for example 200.00).

This excludes that a text is entered from provided.

You also adjust the Numerical Fields in height, width and font in the "Numeric Field > Properties" dialog.

Here the orientation is set to "Left".

Here are the entries for the Numerical Fields:

Entries for: Numeric field 1 Numeric field 2
Font Calibri Calibri
Font size 9 9
Text highlighting Default Default
Width 5,20 cm 5,20 cm
Height 0,60 cm 0,60 cm

Date Field

Furthermore, you still need three Date Fields.

To do this, click on the "Date Field" icon and pull up a field.

The further adjustments in the dialog:

"Date Field > Properties", proceed as mentioned above.

Alignment here also "left".

For the "Date Format" you indicate in the dialog "DD/MM/YYYY".

Here are the other entries for the Date Fields:

Entries for: Date field 1 Date field 2 Date field 3
Font Calibri Calibri Calibri
Font size 9 9 9
Text highlighting Default Default Default
Width 6,60 cm 6,60 cm 6,60 cm
Höeight 0,60 cm 0,60 cm 0,60 cm

Simultaneous change to multiple form fields

You can also change the properties of multiple form fields at the same time.

Select Form ▸ Form Navigator… from the menu.

In the Form Navigator dialog, select the form fields you want to change.

You can do this with ⇧ Shift + Click resp. Ctrl + Click, each time on a form label.

Then rightclick on one of the form labels and select "Properties" from the context menu.

In the "Properties: Multiselection" dialog, you can now change the desired properties.

For example, set the background color to orange.

Manage Icons

In the "Form Controls" toolbar you will find four Manage icons on the left side.

"Form Controls" toolbar - Legend
No. Icon No. Icon No. Icon No. Icon
1 Select 2 Design Mode 3 Toggle Form Controls Wizards 4 Form Design

Select arrow icon

With the Selection arrow you can select single or multiple controls in Design Mode.

Design Mode icon

This icon is a toggle between Design Mode for editing controls and View Mode, where you can enter text or values in the Form Controls.

Toggle Form Controls Wizards icon

The icon toggles the Wizards for automatic Form Controls on or off.

Use these Wizards to enter the properties of List Boxes, Table Control, and other Form Controls.

Form Design icon

The icon Toggles the "Form Design" toolbar on or off.

Form Design toolbar

As mentioned above, the Form Design toolbar can be toggled on or off using the Form Design icon on the Form Controls toolbar.

But it can also be done from the View ▸ Toolbars ▸ Form Design menu.

"Form Design" toolbar - Legend
No. Icon No. Icon No. Icon
1 Select anchor for object 8 To Background 15 Aktivation Order
2 Align Objects 9 Select 16 Open in Design Mode
3 Bring to Front 10 Design Mode 17 Automatic Control Focus
4 Forward one 11 Control Properties 18 Position and Size
5 Back one 12 Form Properties 19 Display Grid
6 Send to Back 13 Form Navigator 20 Snap to Grid
7 To Foreground 14 Add Field 21 Helplines While Moving

Save document

After all fields have been inserted, the document must now be saved under a new name if possible, for example: "Bill of sale about used item_V6 - fillable.odt".

Export PDF / Save

Create PDF form

In the next step, you conclude with Writer File ▸ Export as ▸ Export as PDF….

In the Dialog that opens "PDF Options" be careful that at a check mark is placed.

Also pay attention to the possibility to allow duplicate field names or not.

Click on Export.

In the following Dialog "Export" you select our storage location, enter a name and click on Save.

Now you can close Writer.

Create a hybrid PDF

To create a hybrid PDF

Fill out the PDF form

Now open the exported PDF file in a PDF reader (e.g. Adobe Reader), see: Used working documents.

Now you can fill out the form.

After the completed filling it is essential to save the PDF file under a new name, e.g. "My completed form".

Dependence of the height of the fields on the font size

When using the control fields, make sure that there is a dependency between Font size and type with the Field height.

In our example of use, the font "Calibri" and font size of "9 point" were used for the "Text fields", "Numeric fields" and "Date fields".

Some combinations with font size and type and field height

Examples, see picture: Size combinations for Text Boxes

The values do not always agree 100%.

If in doubt, a test with the desired combination of font, size, etc. should be carried out beforehand.

Further informations

New Content Controls in Writer V7.4/7.5

Content Controls in Writer

Used working documents

working document used

Bill of sale about used item_V6.odt

Bill of sale about used item_V6 - fillable.odt

Bill of sale about used item_V6 - fillable.pdf

Combinations for Text Boxes (ODT)

Notes on the forms used here

 Note 
 As the basis of this form the form "Allgemeiner Kaufvertrag von privat" of markt.de
 was used and can be downloaded for free by anyone.

Please refer: http://www.markt.de/contentId,AllgemeinerKaufvertrag/inhalt.htm there at "Allgemeiner Kaufvertrag von privat - Muster zum Download".

The form used here is only a demonstration of how fillable forms can be created in LibreOffice.

The Document Foundation and the editor Hrbrgr (talk) 2018-03-06T19:22:22 (UTC) of these forms are not responsible for the use of these contract forms, this is at their own responsibility.

Documentation / Manuals

Here you will find the Documentation / Manuals:

Documentation / Manuals

Any questions?

For questions on this topic go to:

Ask.LibreOffice

Get Involved

Join us today and help us to make it even better!

Get Involved

LibreOffice is Free Software and is made available free of charge.

Your donation, which is purely optional, supports our worldwide community.

If you like the software, please consider a Donation.