Using a form in Writer to fill in fields within the same document

I am trying to create a single document in Writer with two components: (1) a fillable form with various fields (“name”, “address”, etc.) and a submit button; and (2) a letter with fields to be filled in by the form data, to be done upon pressing the button.

I have the basic form put together, but I don’t see how to set up the fields in the letter below the form to receive data from the form. I’ve read through the documentation on fields and forms, but they mostly deal with sending/receiving data to/from an external source like a database. I want everything to happen right there in that one Writer file.

To rephrase/summarize - how do I link form data to a field in Writer (v. 7.3.3.2 (x64))?

Welcome!

And if there is no button in the form, and the necessary places in the letter are filled with text immediately after filling in the next field in the form - will that be bad?

I guess that would be fine.

Okay, so axe the button…

Forms don’t coexist well with “standard” documents.

Since you don’t seem to feed some kind of database from your proposed form, you should try usual fields, more precisely Set variable fields.

The pros are you can reference very easily your variables as Show variable fields.

The cons are poor ergonomics compared to forms. You should enter some default value in your defining fields so that you can easily spot where to enter data. Don’t overwrite it, but double-click on the field to change its value through the dialog. Enable View>Field Shadings to highlight variable locations.

To summarize, start with a page where your fields are labelled with some explanatory text. Insert a page break to start your letter template with its replacement fields.

1 Like

The advantage I am seeking from doing this with a form is the ability to navigate between the fields with the Tab key.

Alas, this is not possible with fields. So you must choose between form (and not being able to reference the form widgets) and fields (without Tab-navigation – anyway, navigation with fields is dangerous because of the risk of overwriting them, resulting in erasure).